Command button code

Harley

Registered User.
Local time
Today, 09:33
Joined
Dec 8, 2005
Messages
54
This is code in a command button on a form to preview a report.
DoCmd.OpenReport stDocName, acViewPreview, "Control Room Query", "[Lot #] = Forms![Hydro COA]![LotNumber]"
What could I change in this code to use in a different command button to have the report sent as an attachment in snapshot format in an email? The user would have to fill in the address, subject and body of the email.
Thanks much!
 
You need some variation of DoCmd.SendObject.

The Help notes within Access itself give a pretty good example of this.
 

Users who are viewing this thread

Back
Top Bottom