Last Question on Send Macro

  • Thread starter Thread starter T
  • Start date Start date
T

T

Steve Schapel gave this advice:

"First way would be to put a GoToRecord/Next action at
the end of your macro, and then use another macro, with
the RunMacro action, to run your SendObject macro, with
the RepeatCount argument set to the number of records in
your query."

I would like to know what the best way to set the
RepeatCount argument to the queries number of records when
that query has a variable number of records based on the
current day.

Thanks again for the help.
 
T,

You could put an unbound textbox on a form, with its Control Source
property set to...
=DCount("*","NameOfYourQuery")
Then, in the Repeat Count argument of the RunMacro macro action, you can
refer to this textbox, using syntax such as...
=[Forms]![NameOfForm]![NameOfTextbox]
 
Works like a charm. Thanks Steve.
-----Original Message-----
T,

You could put an unbound textbox on a form, with its Control Source
property set to...
=DCount("*","NameOfYourQuery")
Then, in the Repeat Count argument of the RunMacro macro action, you can
refer to this textbox, using syntax such as...
=[Forms]![NameOfForm]![NameOfTextbox]

--
Steve Schapel, Microsoft Access MVP

Steve Schapel gave this advice:

"First way would be to put a GoToRecord/Next action at
the end of your macro, and then use another macro, with
the RunMacro action, to run your SendObject macro, with
the RepeatCount argument set to the number of records in
your query."

I would like to know what the best way to set the
RepeatCount argument to the queries number of records when
that query has a variable number of records based on the
current day.

Thanks again for the help.
.
 
Back
Top