Handling close instead of send using SendObject

jeffcullina

New member
Local time
Today, 02:15
Joined
Jul 11, 2001
Messages
7
I have SendObject set up and working. The user can press a button on a form that evokes the SendObject command, which in turn opens an MS Outlook mail message. If the user elects to send the message, there are no problems. If the user closes the mail message instead of sending it, the next time the button is pressed, Access will not open a mail message. Once Access is closed and reopened the problem goes away. The code I am using is:

Private Sub EmailBtn_Click()
On Error GoTo Err_EmailBtn_Click

DoCmd.SendObject , , , "jeff@yahoo.com", , , , "Test Message"

Exit_EmailBtn_Click:
Exit Sub

Err_EmailBtn_Click:
MsgBox Err.Description
Resume Exit_EmailBtn_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom