EmailingSpecificReports.mdb (advanced) |
Post Reply |
Author | |
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
Posted: 01 Aug 2008 at 4:50am |
Please consider donating $1 per sample downloaded, find out why here.
EmailingSpecificReports.mdb This illustrates how to email the same report with different data to a variety of users. The User table holds the user's email name, and the criteria on which the report is based. In this case it is just one criteria [Acct] = whatever is in the Param field. The module goes through the Users table one record at a time and re-creates the query on which the report is based. Then emails the report to the appropriate user as indicated in the User table. If there is no data in the report, it aborts the email. (See the report's OnNoData event.)
To use this function, you must have email installed and have the names of real email users in the Users table. Then just go to the module, insert your cursor anywhere in the subroutine and push the Go/Continue button. This same is meant to only be used with Access 97 and Outlook 98 or earlier. The SendObject method no longer works reliably with any version of Office 2000 SR1 and higher. It really isn't a problem with Access, but with Outlook. See this link for more information: |
|
|
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |