Moving through records in a form

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
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top