send email -taking the email address from subform (1 Viewer)

Nancythomas

Registered User.
Local time
Today, 13:39
Joined
Apr 20, 2010
Messages
59
I need to send email from 'Form" by a click of a button command
(1) In FrmEmail - I select the Department
(2) Subform displays the list of people from the selected Department
(3) Email to be sent to all the selected people from sub form "frmEmpMobileNos"
(4) email address is on the subform "frmEmpMobileNos"


The code just does not work




Attached is the sample DB
 

Attachments

  • EmployeeContactTEST.accdb
    896 KB · Views: 68

June7

AWF VIP
Local time
Today, 12:39
Joined
Mar 9, 2014
Messages
5,473
The control named lstMobile is an OLEObject control. Why is it on the form?

Subform is not needed for this process. Use VBA to open a recordset of email addresses filtered by department and loop through recordset to build address list for email. This is a very common topic.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:39
Joined
Oct 29, 2018
Messages
21,474
Hi. Here's one simple function that does what June7 was saying. Hope it helps...
 

Users who are viewing this thread

Top Bottom