Moving through records in a form

  • Thread starter Thread starter Paul Fenton
  • Start date Start date
P

Paul Fenton

I have a filtered form that looks at certain records from a table
containing thousands of records. On the form is a command button
"Recalculate" that updates the current record after the user does
certain things. (Don't ask why I have to do that)

What I'd like to do is to execute that code from "Recalculate" on
every record the form shows, not on every record in the table.

Is there a way to page through the records one by one, execute the
code then move to the next til at the end?


Paul Fenton
 
you could create a recordset in VBA, using the same
parameters as the form's current filter, then use a Do,
Loop Until EOF to run the "Recalculate" code.
*****AIR CODE
Rst.MoveFirst
Do
'run Recalculate code
Rst.MoveNext
Loop Until EOF = True

etc, etc, etc.
hth
 
Back
Top