Send Macro

T

T

I am using =[Forms]![Today]![PM] to populate the To
argument in a Send macro. The problem is it only uses 1
record, is it possible to have this select all records.
This form is based on a query if that helps. Thanks
 
S

Steve Schapel

T,

There are two ways you could do this. 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. This
will result in a separate email being sent to each recipient. Second,
you could use a VBA procedure instead of a macro to send the email, and
in this procedure use a loop to build a string comprising all the email
addresses from the recordset.
 
G

Guest

Thanks for the help. Ill give it a try.
-----Original Message-----
T,

There are two ways you could do this. 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. This
will result in a separate email being sent to each recipient. Second,
you could use a VBA procedure instead of a macro to send the email, and
in this procedure use a loop to build a string comprising all the email
addresses from the recordset.

--
Steve Schapel, Microsoft Access MVP

I am using =[Forms]![Today]![PM] to populate the To
argument in a Send macro. The problem is it only uses 1
record, is it possible to have this select all records.
This form is based on a query if that helps. Thanks
.
 

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