I'm pretty new to Access and trying to sort out a sendmail button. I've created a function that sends to a specified e-mail address but am having troubles sending it to the e-mail addresses listed on my query. I have provided the code I currently have below. In the section below I just want to know what I could include in the line strEmailAddress so that it would call e-mail addresses from the query.
Public Sub SendMail()
'Provides the Send Mail automation
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strSubject As String
Dim strEmailAddress As String
Dim strEMailMsg As String
Dim ingCounter As Integer
Dim intCount As Integer
strSubject = "Latest Job Outcomes"
strEmailAddress = "[need help here!]"
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("qryEmailOut")
Do Until rst.EOF
strEMailMsg = rst![First Name] & " " & rst![Surname] _
& " - "
'EMAIL USER DETAILS & ATT REPORT
DoCmd.SendObject , , acFormatRTF, strEmailAddress, _
, , strSubject, strEMailMsg, False, False
Set rst = Nothing
Set dbs = Nothing