Wayne Cramer
Registered User.
- Local time
- Today, 02:35
- Joined
- Aug 10, 2007
- Messages
- 93
I have a form from which I send and Email to the responsible party for a task. The e-mail address is picked up from a fielsd in the form named Email and the VBA runs on an on click event from a button on the form. The only problem is when someone clicks the button but there is no email entry for the form and an error message appears. The code appears below. Is there any way to add error trapping to give the operator a message to select an e-mail recipient? The Me.Email_Sent line provides a check mark in a yes no field to shopw an e-mail was sent. Any suggestions will be greatly appreciated.
Me.Refresh
stText = "You have been assignerd a new Order Support Automation issue. See details in the attached spreadsheet below."
DoCmd.SendObject acSendQuery, "qryForEmail", acFormatXLS, Me.Email, , , ":: New Order Support Automated Response Issue ::", stText
Me.Email_Sent = True
Me.Refresh
stText = "You have been assignerd a new Order Support Automation issue. See details in the attached spreadsheet below."
DoCmd.SendObject acSendQuery, "qryForEmail", acFormatXLS, Me.Email, , , ":: New Order Support Automated Response Issue ::", stText
Me.Email_Sent = True