DoCmd.SendObject Error Msg

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a E-mail that I can send by using the DoCmd.SendObjest and it works great!! BUT if the user does not send the E-Mail they get an Error msg with the debug or End. I would like it so the user does not get this Error Msg. Can I just have a Msg Box that would comes up with "No E-mail Sent"??
 
'** Include an error trap
On Error GoTo emessage:
'This is your code

docmd.sendobject,acsend.......

endthisevent:
Exit Sub

'This is where the error trap begins
emessage:
msgbox "There was an error" & err.description
resume endthis:
'The err.description is optional (I use it for
troubleshooting)


'******Hope this helps





-----Original Message-----
I have a E-mail that I can send by using the
DoCmd.SendObjest and it works great!! BUT if the user
does not send the E-Mail they get an Error msg with the
debug or End. I would like it so the user does not get
this Error Msg. Can I just have a Msg Box that would
comes up with "No E-mail Sent"??
 
Back
Top