O
OscarC
Hello,
I have a form with a button on that generates a report and creates a
new email message, using the following code:
Private Sub cmd_Email_Report_Click()
On Error GoTo Err_cmd_Email_Report_Click
Dim stDocName As String
stDocName = "rpt_Email_Notification"
DoCmd.SendObject acReport, stDocName, acFormatSNP, _
"(e-mail address removed)", , , _
"Subject", "Message Text", True
Exit_cmd_Email_Report_Click:
Exit Sub
Err_cmd_Email_Report_Click:
MsgBox Err.Description
Resume Exit_cmd_Email_Report_Click
End Sub
I would like to modify this code so that the code will get the email
address to send the report to from a table or query. How would I do
this?
Thanks,
Michael
I have a form with a button on that generates a report and creates a
new email message, using the following code:
Private Sub cmd_Email_Report_Click()
On Error GoTo Err_cmd_Email_Report_Click
Dim stDocName As String
stDocName = "rpt_Email_Notification"
DoCmd.SendObject acReport, stDocName, acFormatSNP, _
"(e-mail address removed)", , , _
"Subject", "Message Text", True
Exit_cmd_Email_Report_Click:
Exit Sub
Err_cmd_Email_Report_Click:
MsgBox Err.Description
Resume Exit_cmd_Email_Report_Click
End Sub
I would like to modify this code so that the code will get the email
address to send the report to from a table or query. How would I do
this?
Thanks,
Michael