Eikenhorst
Registered User.
- Local time
- Today, 16:45
- Joined
- Mar 9, 2007
- Messages
- 25
Hello,
I’m working on an unbound form that has sends the information on the form by mail to a user after the information has been saved to the table and before the new information is loaded.
The users have to send this e-mail, even though most of them don’t want to. But Windows now gives a warning if a program tries to send an e-mail and they can choose not to send it. This will result in an error message “Microsoft Office Access can’t send this e-mail message”.
I don’t want the users to be able to reject sending that e-mail. But I understand that this will not be possible under Windows. So I want to catch them in an on error statement saying that they have to send this e-mail, and then try to mail it again.
This code will have to look like this:
On Error GoTo Message
Retry:
DoCmd.SendObject acSendForm, “Testform”, acFormatXLS, “User”, , , , ,False
Goto Continue
Message:
MsgBox “You have to send this e-mail in order to continue”
GoTo Retry
Continue:
For some reason the On Error code doesn’t prevent this error message from showing. What am I doing wrong here? Any help is greatly appreciated!
I’m working on an unbound form that has sends the information on the form by mail to a user after the information has been saved to the table and before the new information is loaded.
The users have to send this e-mail, even though most of them don’t want to. But Windows now gives a warning if a program tries to send an e-mail and they can choose not to send it. This will result in an error message “Microsoft Office Access can’t send this e-mail message”.
I don’t want the users to be able to reject sending that e-mail. But I understand that this will not be possible under Windows. So I want to catch them in an on error statement saying that they have to send this e-mail, and then try to mail it again.
This code will have to look like this:
On Error GoTo Message
Retry:
DoCmd.SendObject acSendForm, “Testform”, acFormatXLS, “User”, , , , ,False
Goto Continue
Message:
MsgBox “You have to send this e-mail in order to continue”
GoTo Retry
Continue:
For some reason the On Error code doesn’t prevent this error message from showing. What am I doing wrong here? Any help is greatly appreciated!