Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Sendobject

Status
Not open for further replies.

psbsmms

Programmer
Dec 14, 2001
74
I have a database that tracks tasks and suspenses. Once a tasks is created I send the task via e-mail to the taskee. This is working fine, however when I try to do the same thing to reverse and update the tasker I intermittantly get error 2501. the code I am using is below. I whant to be able to pull from several email list so I do not want the e-mail pre addressed.

pete = Me!Text6.Value
luna = Me!UpdateInformation.Value
DoCmd.SendObject , , , "", "", "", pete, luna, True
 
You SHOULD receive a 2501 error each time you cancel the Email. You need to trap this error and move on OR ignore the error.

' Ignore and move on
On Error Resume Next
pete = Me!Text6.Value
luna = Me!UpdateInformation.Value
DoCmd.SendObject , , , "", "", "", pete, luna, True

' Trap the error and move on
On Error GoTo HandleErr
pete = Me!Text6.Value
luna = Me!UpdateInformation.Value
DoCmd.SendObject , , , "", "", "", pete, luna, True
Exit_Proc
Exit Sub
HandleErr
Select Case Err.number
Case 2501
Resume Next
Case Else
GoTo Exit_Proc
End Select
End Sub

For your information SendObject in Access 2000 has a significant number of bugs associated with it. Search for SendObject in Tek-Tips or on the Microsoft Knowledgebase and you will be overwhelmed with them.
-------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
Thanks, I found all of the messages on it but after a day of playing with it and looking on the site I gave up. I did find a wonderful workaround that has more functionallity. I found it through one of the other posts. I can dig it back up if you want to see it. One of the nice things it does is allows for you to send an attachment programmily.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top