error 2501 The SendObject was cancelled (1 Viewer)

mrrayj60

Registered User.
Local time
Today, 02:43
Joined
Sep 3, 2009
Messages
103
I have a button that opens outlook and puts the forms email address in, click send and everything is good. If I close the email without sending it gives me a runtime error 2501 The SendObject was cancelled. It's only a problem if I do not send an email. Any thoughts?
Thanks, Ray


Private Sub txtemail_Click()
DoCmd.SendObject acSendNoObject, , , emailtxt, , True
End Sub
 

leblanc9425

Registered User.
Local time
Today, 02:43
Joined
May 8, 2013
Messages
22
I am having the exact same trouble as MrRayj60 with my Access 2007 form. I have a button that opens Outlook and puts the forms email address in, click send and everything is good.

However, if I close the email without sending, it gives me a "Run-time error 2501 The SendObject action was cancelled". This error only happens if I do not send an email. If I send the email, the remainder of the script runs fine.

How do I supress or eliminate this error???
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:43
Joined
Aug 30, 2003
Messages
36,124
Trap for the error, as already answered.
 

spikepl

Eledittingent Beliped
Local time
Today, 08:43
Joined
Nov 3, 2010
Messages
6,142
What makes you think that the solution in #2 does not apply to you?
 

Users who are viewing this thread

Top Bottom