Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send an email by looking into an Access table??

Status
Not open for further replies.

q4s72534

MIS
Aug 19, 2003
59
US
I want to send a 100 emails and I have a 100 names in a table. How can I create one email and it look for the name and send out a 100 times with diffrent names?

thanks
 
Hi

You will need a reference to DAO to use this code

Dim Db as DAO.Database
Dim Rs as DAO.Database

SEt Db = CurrentDb()
Set Rs = db.OPenRecordset("SELECT * FROM MyTable;")
Do Until Rs.EOF
DoCmd.SendObject ...etc see help for syntax and using acSendNoObject setting
Rs.MoveNExt
Loop
Rs.Close
Set Rs = Nothing
Set Db = Nothing

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top