T
Tony Williams
I have a form which has a tick box control which has SendObject code to
email a report. The code is
Private Sub Loadtxt_Click()
On Error GoTo Err_Handler
DoCmd.SendObject acSendReport, "rptOnlineUpload", acFormatRTF, , , ,
"OnLineUpload", "Please upload this document to Online", True
Exit_Handler:
Exit Sub
Err_Handler:
MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler
End If
End Sub
This works fine except that if the user closes Outlook and doesn't send the
email I get an error message that says error 2501 The send Object was
cancelled
Is there anyway I can code a message that is a little more user friendly
like "Are you sure you dont want to send the email" with YES/NO buttons and
if YES they stay in Outlook and if No they close Outlook without another
error message
TIA
Tony Williams
email a report. The code is
Private Sub Loadtxt_Click()
On Error GoTo Err_Handler
DoCmd.SendObject acSendReport, "rptOnlineUpload", acFormatRTF, , , ,
"OnLineUpload", "Please upload this document to Online", True
Exit_Handler:
Exit Sub
Err_Handler:
MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler
End If
End Sub
This works fine except that if the user closes Outlook and doesn't send the
email I get an error message that says error 2501 The send Object was
cancelled
Is there anyway I can code a message that is a little more user friendly
like "Are you sure you dont want to send the email" with YES/NO buttons and
if YES they stay in Outlook and if No they close Outlook without another
error message
TIA
Tony Williams