Action for all Records

Rosebud

Registered User.
Local time
Today, 23:57
Joined
Dec 5, 2000
Messages
28
Hi,

I am trying to perform an action for each record on a form. I have my code in the OnCurrent event, but when the form opens, the oncurrent event only runs for the first record, not the rest. The code is run for the rest only when I click on that record. Where do I have to put my code so that when the form opens, the code is automatically run for each record?
 
You need to loop through your records in your code.

Post more details and your code.

Kevin M
 
Thanks Kevin and Pat.

Kevin, you were right, that's what I had to and I figured it out yesterday. What I did was counted the number of records in Me.Recordset, moved to the first record, performed the code, moved to the next record, and looped it all over again:

Set rst = Me.Recordset
rst.movelast
x=rst.recordcount
rst.movefirst

For indx = 1 to x Step 1
CODE
rst.Movenext
Next indx

Something like that, and it worked. Thanks again. (I wasn't trying to update all the rows, just doing heavy code)
 

Users who are viewing this thread

Back
Top Bottom