troubleshooting Question

EmailDatabaseObject "Multiple Reports"

Avatar of dawber39
dawber39Flag for United States of America asked on
Microsoft Access
7 Comments1 Solution2507 ViewsLast Modified:
I have this code within a module that emails specific reports to client. The code calls a function that opens up Outlook, calls a wait function and waits 20 seconds for Outlook to send/receive. It then sends an email with one report, waits 3 seconds, then another, and another, and Outlook does an automatic send/receive before exiting. The problem is all these emails are going to the same person.

What I would like to do is make it so that all three reports, are sent in the same email. I have tried various combinations of the code and they all fail. This is the code that sends the emails:

    OpenOL
    WaitSeconds (20)
    DoCmd.SendObject acReport, "CustStmt", "PDFFormat(*.pdf)", "rick@kilduff.com", "", "", "CustStmt", "", False, ""

    WaitSeconds (3)

    DoCmd.SendObject acReport, "CustAdjmts", "PDFFormat(*.pdf)", "rick@kilduff.com", "", "", "CustAdjmts", "", False, ""

    WaitSeconds (3)

    DoCmd.SendObject acReport, "CustStmt Summary (Roche)", "PDFFormat(*.pdf)", "rick@kilduff.com", "", "", "CustStmt Summary (Roche)", "", False, ""
   
CloseOL

Any help would be greatly appreciated
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros