Email from Access

S

Simon

I have some code that creates an email for me to send

DoCmd.SendObject acSendNoObject, , acFormatTXT, _
strTo, , , strSubject, strBody, True



IT loads up the the email if i decdie not to send the email and close
the email access brings up an VB erros
Run time Erros 2501

The send Object action was canceled

How do i stop this error
 
D

Douglas J. Steele

Well, in all fairness, the message is correct: you did cancel the action.
<g>

Try putting error handling into the routine that calls SendObject, and
specifically trap that error. If you're not familiar with error handling,
see what Allen Browne has at http://www.allenbrowne.com/ser-23a.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top