Need help emailing reports

  • Thread starter Thread starter Erich Campbell
  • Start date Start date
E

Erich Campbell

Hello,

A colleague and myself have been working on a
multifunctional access database keeping track of various
inventories. One thing we wish to do is email a report to
a user with a single click. We have a form that has
various data input into it including a user's email
address. We want to be able to make a command button that
attaches that forms corresponding report and also fills in
the email address based on what has been input on the
form. Making it attach the report is easy, but I am
having trouble making it fill in the email addy. I dont
know Vbasic that well, so I think I am just doing
something stupid. The code for the report is done through
the wizard, but adding the address I have been trying to
script myself.

Any help would be appreciated.
 
You can use something like the following for the OnClick
event of the command button:

DoCmd.SendObject
acReport, "YourReportName", "RichTextFormat(*.rtf)", Forms!
YourFormName!EmailAddressControl, "", "", "", "", False, ""
 
Back
Top