August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!
Dim MyDb As DAO.Database Dim MyRS As DAO.Recordset Dim strTo As String Dim strCC As String Dim strBCC As String Dim strMsg As String Dim strSubject As String Set MyDb = CurrentDb Set MyRS = MyDb.OpenRecordset("qryEmail", dbOpenDynaset) 'This is the recordset MyRS.MoveFirst Do strTo = MyRS("Email") 'THIS IS THE EMAIL FIELD strMsg = "Message " 'This is the mail message strSubject = "Subject" 'This is the subject DoCmd.SendObject acReport, "ReportName", acFormatXLS,strTo, strCC, strBCC, strSubject, strMessage,val(0) ' send mail MyRS.MoveNext Loop Until MyRS.EOF MyRS.Close MyDb.Close
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.