Groundrush
Registered User.
- Local time
- Today, 13:37
- Joined
- Apr 14, 2002
- Messages
- 1,376
I have been able to email reports through Access
I would now like to know how to feed details of the Report into the Subject Line of the Email.
For example to include the Job No or the Property Name of the Job the report refers to.
so far all I can do is include "Please See Attached" in the email itself.
below is my code
Private Sub cmdEmailJob_Click()
DoCmd.SendObject cReport, "rptVinciInstructionToEngageSubCon", "RichTextFormat(*.rtf)", EMail, , , SubjectLine, _
"Please see attached.", False
DoCmd.SetWarnings False
'DoCmd.RunSQL "UPDATE tblSubConOrders SET tblSubConOrders.MailSent = -1 WHERE (((tblSubConOrders.MailSent)=0))"
DoCmd.OpenQuery "qryEmailSent", acNormal, acEdit
DoCmd.SetWarnings True
DoCmd.Close acForm, "frmSubConOrders"
DoCmd.OpenForm "frmSubConOrders", acNormal, "", "", , acNormal
DoCmd.GoToControl "JobNo"
DoCmd.GoToRecord , "", acNewRec
End Sub
Thanks
I would now like to know how to feed details of the Report into the Subject Line of the Email.
For example to include the Job No or the Property Name of the Job the report refers to.
so far all I can do is include "Please See Attached" in the email itself.
below is my code
Private Sub cmdEmailJob_Click()
DoCmd.SendObject cReport, "rptVinciInstructionToEngageSubCon", "RichTextFormat(*.rtf)", EMail, , , SubjectLine, _
"Please see attached.", False
DoCmd.SetWarnings False
'DoCmd.RunSQL "UPDATE tblSubConOrders SET tblSubConOrders.MailSent = -1 WHERE (((tblSubConOrders.MailSent)=0))"
DoCmd.OpenQuery "qryEmailSent", acNormal, acEdit
DoCmd.SetWarnings True
DoCmd.Close acForm, "frmSubConOrders"
DoCmd.OpenForm "frmSubConOrders", acNormal, "", "", , acNormal
DoCmd.GoToControl "JobNo"
DoCmd.GoToRecord , "", acNewRec
End Sub
Thanks