How to stop RecordsGoToNext?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that I want to perform a calculation on all records when the
form opens.
I set up a macro to set a value for a field. Then I set the macro to go to
each record by using the run command "RecordsGoToNext". The problem is that
it will try to add a new record when it gets to the end of the data.

How do I tell the macro to stop at that point and then perform more steps?
 
I have a form that I want to perform a calculation on all records when the
form opens.

ummm...

What kind of calculation, and why?? I hope you're not storing values
of calculated fields in the Table...

Could you not base the Form on a Query, with the calculations in the
query?
I set up a macro to set a value for a field. Then I set the macro to go to
each record by using the run command "RecordsGoToNext". The problem is that
it will try to add a new record when it gets to the end of the data.

How do I tell the macro to stop at that point and then perform more steps?

I'm not sure how (or if!) you can do it with a Macro, but it's easy
with VBA code. If you could explain the nature of the calculations
there's surely a simple solution.

John W. Vinson[MVP]
 

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

Back
Top