Sending Multiple Emails via VBA & Checkboxs

danz013

Registered User.
Local time
Today, 23:37
Joined
Sep 30, 2008
Messages
15
Hi All,

I've got a theoretical problem I'm hoping you can help with.

see the image below. It's one of my forms. The form basically holds info concerning the products (and customers they belong to) that are coming in on each shipment.

I want to be able to send an email to all these customers. I've already worked out how to do that.

Now, I want to send an email only to specific customers. I'll do this by selecting one of those check boxes on the far right hand side and then pressing the email all button.

I can't work out how this is going to work in VBA?

What I really need to understand is, how can I get VBA to record all the email addresses for the records where the boxes have been checked? Once I've worked that out, I can work out all the rest by myself.

FYI - I've successfully managed to get it to work out a single email address. To do this I simply press the button beside the checkboxes which initial some VBA code which notes the Invoice Number, and then pulls up the email address associated with that invoice.

I hope this makes sense to you all. Let me know if you need any info.

3616070417_e1934b24cd_b.jpg
 
danz013,

I would like a little more info before attempting to offer any suggestions.

Does the check box you are checking to indicate that you want to send an email represent a field in your database?
 
Hi Mr B,

No, the check box doesn't represent a field in my database? Would it make it easier it did?
 
Well, I was just thinking that if there was a Yes/No field in your table that could be used to identify the record that needed to be emailed, you could simply use a query or SQL statement to return the records that need to have an email sent and then simply step through the recordset, sending each one an email. When that operations was complete you could run an update query that would reset all records to No so that next time the same process can be repeated.

Just my thoughts.
 

Users who are viewing this thread

Back
Top Bottom