S
S Price
Below is some code I have for a command button. The
problem is I need to know whether the user sent/cancelled
the email. When the user is cancelling the e-mail, it's
not returning an error. Any ideas?
ps. warnings are on
On Error GoTo err_cmdSend_Click
Screen.MousePointer = 11
DoCmd.SendObject acSendNoObject, ,
acFormatTXT, , , , , , True
exit_cmdSend_Click:
Screen.MousePointer = 0
Exit Sub
err_cmdSend_Click:
If Err.Number = 2501 Then
MsgBox "E-mail not sent"
Else
MsgBox Err.Description, vbExclamation, Err.Number
End If
Resume Next
problem is I need to know whether the user sent/cancelled
the email. When the user is cancelling the e-mail, it's
not returning an error. Any ideas?
ps. warnings are on
On Error GoTo err_cmdSend_Click
Screen.MousePointer = 11
DoCmd.SendObject acSendNoObject, ,
acFormatTXT, , , , , , True
exit_cmdSend_Click:
Screen.MousePointer = 0
Exit Sub
err_cmdSend_Click:
If Err.Number = 2501 Then
MsgBox "E-mail not sent"
Else
MsgBox Err.Description, vbExclamation, Err.Number
End If
Resume Next