Hello all, I have a report that is emailed out of my database in snapshot format, I would like to automatically include the OrderID number of the order in the subject line of the email. Any help is greatly appreciated
I am emailing from a form via a command button my email program is outlook
Here is the code on the button:
Private Sub EmailWOREQ_Click()
Dim stDocName As String
stDocName = "WO REQ"
DoCmd.OpenReport stDocName, acPreview, , "[OrderID] = Forms![Orders].form![OrderID]"
DoCmd.SendObject acReport, stDocName, "Snapshot Format", "someone@somewhere.com", "someoneelse@somewhere.com", , "A work order request has been sent.", "Please see attached file"
Private Sub EmailWOREQ_Click()
Dim stDocName As String
stDocName = "WO REQ"
DoCmd.OpenReport stDocName, acPreview, , "[OrderID] = Forms![Orders].form![OrderID]"
DoCmd.SendObject acReport, stDocName, "Snapshot Format", "someone@somewhere.com", "someoneelse@somewhere.com", , "A work order request has been sent: " & Forms![Orders].form![OrderID], "Please see attached file"
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.