Stop Macro With Repeat Expression

  • Thread starter Thread starter Casey
  • Start date Start date
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
 
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


.
 
Back
Top