PDA

View Full Version : Record Set in the body of an email from Access



sttoph
02-17-2012, 11:18 AM
Hello All,
I need to accomplish the following after I click a buttton

I have 2 tables: Email, and Details. emails has 1 field called email and contains emails no duplicates. Details Table has 2 fields, email, and SR. an e mail can have 0,1, or multiple SRs.

I want to be able to write some VBA code in MsAccess in the event of clicking the button to loop through the Email table and for each email adress loop in the Detail table, get all the related SR's to that e mail embed all of them in the body of an email and send the email. then move to the next email and so on, until it sends seperate e mails to each email in Detail table with their coresponding SR.

Thank you