philbennison
Registered User.
- Local time
- Today, 21:15
- Joined
- Nov 10, 2004
- Messages
- 49
Hi all.
I have a simple program that will email a report to a specific person when a button is pressed. Is there a way to display a message box with text on it (and an 'ok' button to clear the box) when the email is sent. i am sure it must be an easy command.
My code is below
Private Sub command_Click()
On Error GoTo Err_command_Click
Dim strEmail As String
Dim strDoc As String
strEmail = Forms!main_form!email
strDoc = "document name"
strSubject = "Urgent report from ??"
strMessage = "Please find attached urgent report from ???"
DoCmd.SendObject acSendReport, strDoc, acFormatRTF, strEmail, , , strSubject, strMessage, False
Exit_command_Click:
Exit Sub
Err_command_Click:
MsgBox Err.Description
Resume Exit_command_Click
End Sub
Thanks in advance
Phil
I have a simple program that will email a report to a specific person when a button is pressed. Is there a way to display a message box with text on it (and an 'ok' button to clear the box) when the email is sent. i am sure it must be an easy command.
My code is below
Private Sub command_Click()
On Error GoTo Err_command_Click
Dim strEmail As String
Dim strDoc As String
strEmail = Forms!main_form!email
strDoc = "document name"
strSubject = "Urgent report from ??"
strMessage = "Please find attached urgent report from ???"
DoCmd.SendObject acSendReport, strDoc, acFormatRTF, strEmail, , , strSubject, strMessage, False
Exit_command_Click:
Exit Sub
Err_command_Click:
MsgBox Err.Description
Resume Exit_command_Click
End Sub
Thanks in advance
Phil