Send Macro

  • Thread starter Thread starter T
  • Start date Start date
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
 
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.
 
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
.
 
Back
Top