gusbrunston
Programmer
Hi.
I've written the following private sub that successfully does what I need to do. However, once all the records have been accessed and the calculations performed, I get an error and the sub stops. Can you help me get out of this loop in a proper manner?
Thanks a bunch!
Gus Brunston An old PICKer, using Access2000. I manage Suggestions welcome. padregus@attbi.com
I've written the following private sub that successfully does what I need to do. However, once all the records have been accessed and the calculations performed, I get an error and the sub stops. Can you help me get out of this loop in a proper manner?
Thanks a bunch!
Code:
Private Sub Form_Open(Cancel As Integer)
Dim rs As Object
Set rs = Me.Recordset.Clone
DoCmd.GoToRecord , , acFirst
'Do calculation for first record
Do Until rs.EOF
DoCmd.GoToRecord , , acNext
'Do calculation for each record
Loop
DoCmd.Close
End Sub
Gus Brunston An old PICKer, using Access2000. I manage Suggestions welcome. padregus@attbi.com