Emailing a different report to each recipient

Last updated 2010-09-27

Q:  How do I email a report to separate recipients?  That is each recipient gets their own unique set of pages of the report?

A: You need to think in terms of producing many reports, one for each recipient.

You will need the the code found Sample Code illustrating looping through a DAO recordset to loop through the recordset of email recipients. You will also need the following tip found at Emailing reports as attachments

However you can not pass a filter or where clause as you would in a standard OpenReport command in VBA when outputting the report to a file.  

    Me.Filter = "ShipmentsID=" & Forms![Select Load List]![LoadID]
  Me.FilterOn = True

Therefore you must change the filter or where clause yourself in the reports OnOpen event.

    Me.Filter = "ShipmentsID=" & Forms![Select Load List]![LoadID]
  Me.FilterOn = True

Finally you need to choose a method of emailing the report.  SendObject may work.  Or peruse through the rest of the Email FAQ.

Also see EmailSenate and EmailSenate2K which demonstrate sending multiple reports to multiple recipients

[ Email | Access Tips | Access | Main ]

Auto FE Updater   Auto FE Updater distribute new and updated Front End databases to your users with several mouse clicks.

Wrench and gear Granite Fleet Manager - the best designed fleet maintenance tracking and management system available

Comments email Tony  Search Contact Tony's Blog Privacy Policy Table of Contents

Website copyright 1995-2013 Tony Toews