Repost: Limit report before sending

  • Thread starter Thread starter Garrett
  • Start date Start date
G

Garrett

Hello!
I have a database created with Access2000 tracking
employee vacation data.

In this, there is a supervisor table (SuperTbl) tracking
SuperID(primary key), SuperNm, and SuperEmail. This is
linked to a query (SuperQry) and a report (SuperRpt).

I need to send reports to each supervisor, which means
sending out 20 reports. I'm trying to avoid using a report
for each supervisor, and I was wondering if it were
possible to use a macro to send the super report to each
supervisor in the SuperTbl.

Basically what I want to do is Send SuperRpt to SuperEmail
where Super="Jeff".

This would send Jeff's report to Jeff's email, and then go
on to the next supervisor, doing the same thing for each.

Thank you in advance!
 
Garrett,

If you want to do this with a macro, you need to do something like this...

1. Make a continuous view form based on the SuperTbl table, and include
the email address.
2. Set up your report so its Record Source is a query, and in the
criteria of the SuperID field in the query, reference the current record
on the form, using syntax such as [Forms]![NameOfTheForm]![SuperID]
3. Make a macro to email the report, using the SendObject action. In
the To argument of the mcro, put =[SuperEmail]
4. Add another action to this macro... GoToRecord, Next
5. Make another macro, using the RunMacro action, to run the first
macro, and in the Repeat Count argument, put 20
6. Put a command button on the form, and assign the second macro on its
OnClick event property.
 
Back
Top