Hello,
I have code which successfully creates an email collecting data from a single record. I now need to create an error handler for the error 2501, which occurs when a user cancels sending the email.
Here is the code have been using:
Private Sub Command81_Click()
Dim stdocname As String
Dim stEmail As String
Dim stSubject As String
Dim stbody As String
stdocname = "frmSearch"
stEmail = Me.Email_Address & ""
stSubject = "test"
stbody = ""
DoCmd.SetWarnings False
DoCmd.SendObject acSendNoObject, , , stEmail, stEmailcc, , stSubject, stbody, , False
DoCmd.SetWarnings True
End Sub
I am new to error handling so will continue to read up on the error, but if anyone out there can provide some input I would be grateful.
Thanks