Emailing a Custom Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible for me to directly (or output as an attachment) email a custom report from Access 2002 using Outlook 2002?

I want to be able to click a button on a form, which will first run the report (the user has to select criteria each time the report is run, mainly a date range) then once the report runs have it output either as an email, or as an attachment in an email, or even just export to a document which I can then manually attach to an email and send.

Don't know if any more information is needed, thanks for any help.
 
Ian,

This is do-able. First, you can make the RecordSource for your report a
Parameter Query, which will prompt you to enter selection criteria. Then,
behind your command button on the form you can use the SendObject method to
send the report as an RTF file which can be opened in Word or a Snapshot
which can be opened with the Snapshot viewer.

The SendObject code would look something like the following (you can find a
detailed explanation of all the arguments in VBA Help):

DoCmd.SendObject acSendReport, "NameOfReport", acFormatRTF,
"(e-mail address removed)", , , "Subject", "Message"


hth,
--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Ian said:
Is it possible for me to directly (or output as an attachment) email a
custom report from Access 2002 using Outlook 2002?
I want to be able to click a button on a form, which will first run the
report (the user has to select criteria each time the report is run, mainly
a date range) then once the report runs have it output either as an email,
or as an attachment in an email, or even just export to a document which I
can then manually attach to an email and send.
 
Back
Top