Last Question on Send Macro

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.
 
S

Steve Schapel

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]
 
G

Guest

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.
.
 

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