Hi There, I am trying to get a label (Need Help?) when clicked to open up the box for composing a message.
This code works fine, and brings up the message box, but if I click on the 'x' to close it, an error is produced. I believe this is because the function didn't complete, as the e-mail was never sent.
How can I prevent this from happening, if, say, the user decides after clicking that he doesn't want to send the e-mail, or has clicked on it in error.
Thanks,
DaVuLF
Code:
Private Function sendEmail()
Dim strEmail As String
strEmail = "email@no.com"
DoCmd.SendObject , , , strEmail, , , , , True
End Function
This code works fine, and brings up the message box, but if I click on the 'x' to close it, an error is produced. I believe this is because the function didn't complete, as the e-mail was never sent.
How can I prevent this from happening, if, say, the user decides after clicking that he doesn't want to send the e-mail, or has clicked on it in error.
Thanks,
DaVuLF