Dec 08, 2018 Combo Type: Email:Pass Number Of Lines: 83394 File Size: 2.1 MB Genre: MIX Private: Semi Note: These combos are for those user who don’t know how to make combos and can’t get combos from forums. If you find any hits don’t forget to tell in the comments that this combo. How to send email to recipient selected from a combo box (VBA+Access 2003)? How to send the email to a specific person selected from a combo box? I know that it's.To = '[email protected]' that must be changed but I don't know how to make it look for a value in a combo box?!
I am trying to send an email based on a combobox selection and a click of a submit button. I get a type mismatch error. I used select case because I will be adding more than one combobox with names to the form.
Community♦
Brianna CatesBrianna Cates
![Mail Access Combo Mail Access Combo](/uploads/1/2/5/5/125587198/594701372.jpg)
1 Answer
A couple of things:
1) Avoid using if strEmail = null, or ifnull(strEmail).
Instead, do either if strEmail=', or if len(strEmail)=0
![Mail Mail](/uploads/1/2/5/5/125587198/845445371.jpg)
Reason: when you declare a String variable in VBA, testing it for null will return false. So in your code, it is jumping directly to this part:
which means your string of recipients starts with a comma.
2) Use a semicolon instead of a comma as the separator for recipients in Outlook.
BahamasBahamas
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.