D
Dirk
Hi all,
In a module I programmed the following code :
sub PrintLetter
dim db as dao.database,...,rst as recordset, ...
If rst.RecordCount = 0 Then
AutomaticLetter = False
Exit Function
Else
Do While Not rst.EOF
strCourseId = rst.Fields("Id")
GenerateInvoice strCourseId
rst.MoveNext
Loop
End If
The procedure GenerateInvoice works fine, when called from
a form, but, I now get error 3420 "object no longer
referenced". The recordset rst is local, defined in this
particular procedure.
strCourseId contains the perfect value, the procedure
GenerateInvoice does what I want it to do. Before I
arrive at the GenerateInvoice call, my recordset exists
and contains the records I want. However after returning
from the procedure GenerateInvoice , where I call a local
recordset rst as well, it no longer exists in the calling
procedure ?
Any help would be mostly appreciated.
In a module I programmed the following code :
sub PrintLetter
dim db as dao.database,...,rst as recordset, ...
If rst.RecordCount = 0 Then
AutomaticLetter = False
Exit Function
Else
Do While Not rst.EOF
strCourseId = rst.Fields("Id")
GenerateInvoice strCourseId
rst.MoveNext
Loop
End If
The procedure GenerateInvoice works fine, when called from
a form, but, I now get error 3420 "object no longer
referenced". The recordset rst is local, defined in this
particular procedure.
strCourseId contains the perfect value, the procedure
GenerateInvoice does what I want it to do. Before I
arrive at the GenerateInvoice call, my recordset exists
and contains the records I want. However after returning
from the procedure GenerateInvoice , where I call a local
recordset rst as well, it no longer exists in the calling
procedure ?
Any help would be mostly appreciated.