DoCmd.SendObject acSendReport

Posted on 2009-02-18
Last Modified: 2013-11-28
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.
Question by:ShawnGray
    LVL 119

    Accepted Solution

    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
        Do Until rs.EOF
        DoCmd.SendObject acSendReport, "Collection History All Receipts", acFormatSNP, rs!Email, , , "Test sub", "test msg", , True


    End If

    End Sub

    Author Closing Comment

    Brilliant!  Thank you very much.

    Author Comment

    Hey Cap - I've reposted the question; I didn't realize the event was sending every report to every email person on the list.  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now