DoCmd.SendObject acSendReport

Having trouble with the attached sample.
Based on the conditions in my query, I should get Outlook to send 3 email messages to the three addresses.
Sample.mdb
ShawnGrayAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Commented:
use this

Private Sub SendEmailCmd_Click()
    Dim response
    response = MsgBox("Send Receipts Now?", vbYesNo, "Bluebook")
    If response = vbYes Then

'On Error GoTo ErrNoEmail
    Dim rs As DAO.Recordset
'    Set rs = CurrentDb.OpenRecordset("PaymentHistoryQryList")
    Set rs = Me.RecordsetClone
    rs.MoveFirst
    Do Until rs.EOF
    DoCmd.SendObject acSendReport, "Collection History All Receipts", acFormatSNP, rs!Email, , , "Test sub", "test msg", , True
    rs.MoveNext
    Loop

'ErrNoEmail:

End If

End Sub
0
 
ShawnGrayAuthor Commented:
Brilliant!  Thank you very much.
0
 
ShawnGrayAuthor Commented:
Hey Cap - I've reposted the question; I didn't realize the event was sending every report to every email person on the list.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.