Emailing Reports from Access

  • Thread starter Thread starter Connie
  • Start date Start date
C

Connie

I would like to email an Access report to several
individuals. Each individual will receive the same
report, but with different data.

I would like one command button to execute all the
emails. Any help is appreciated.
 
Hi:

You could use Microsoft Word to create a Merge letter - merge it with Access
data and send the Merge to Email (will do to your default email program).

Regards,

Naresh Nichani
Microsoft Access MVP
 
Doing this from within Access

How does the report produce different data
- Is there a filter taken from the form that runs it
- Is the record source set at runtime

I will assume there is a control somewhere (say 'combo1') which the report references to filter its data

If you have a table with all the recipient email addresses in 1 field, and relevant combo1 (filter) value in the second field, you could loop through this table mailing the report to each person along the way. eg

Table (Recipients)
'address' field 'combo1 filter' fiel
(e-mail address removed) Canad
(e-mail address removed) Britai
(e-mail address removed) Uzbekista
etc.

Bear in mind the filter would have to be within the report. The code would be something like this

Dim dbs As Databas
Dim tabrecipient As TableDe
Dim rstrecipient As Recordse
Dim filter as string 'Whatever is appropriat
Dim emailaddress as strin

Set dbs = CurrentD
Set tabrecipient = dbs.TableDefs("Recipients"
Set rstrecipient = tabrecipient.OpenRecordse

rstrecipient.MoveFirs

Do Until rstrecipient.EO

filter = rstrecipient("Combo1 filter"
emailaddress = rstrecipient("address"
forms![form name]!combo1= filte

DoCmd.SendObject acSendReport, "Report Name", acFormatRTF, emailaddress, , , "Subject", "Main Text", Fals

rstrecipient.MoveNex

Loo

I'm sorry if this idea/solution is too complicated for what you need - maybe someone else will find it helpful

If it does hit the spot, you may want to think about a provision if there is no data in the report

Baz
 
Back
Top