Stop Macro With Repeat Expression

C

Casey

I have a macro that runs another macro. The macro that
is run opens up a form, and goes through the records,
record by record until it gets to the last record. I
then receive an end of recordset message, because the
macro gotorecord "next" action cannot happen. The
RunMacro action that I use to run the other macro has
a "Repeat Expression" box to place a factor, but what do
I put in it? I placed an

isnull([Forms].[form1].[RECID])

expression in the "Repeat Expression" box thinking that
it would evaluate to null when the end of the recordset
was reached, and the macro would stop without any "end of
recordset" message, but it did not work. Does anyone
have a recommendation.

I appreciate any help.

Thank you,

Casey
 
C

Casey

Thank you Ken. I really appreciate the information. Have
a nice weekend.

Casey
-----Original Message-----
Try this:

[Forms].[form1].Form.Recordset.EOF = True

--
Ken Snell
<MS ACCESS MVP>

I have a macro that runs another macro. The macro that
is run opens up a form, and goes through the records,
record by record until it gets to the last record. I
then receive an end of recordset message, because the
macro gotorecord "next" action cannot happen. The
RunMacro action that I use to run the other macro has
a "Repeat Expression" box to place a factor, but what do
I put in it? I placed an

isnull([Forms].[form1].[RECID])

expression in the "Repeat Expression" box thinking that
it would evaluate to null when the end of the recordset
was reached, and the macro would stop without any "end of
recordset" message, but it did not work. Does anyone
have a recommendation.

I appreciate any help.

Thank you,

Casey


.
 

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