Results 1 to 2 of 2
  1. #1
    Robert2150 is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2013
    Location
    Sparks, Nv
    Posts
    104

    Closing Report after Emailing

    I have a button on a form to email a report.



    This is the code:

    Private Sub EmailSfRpt_Click()
    Dim strWhere As String

    strWhere = "[Property Number] = " & Me.[Property Number]
    DoCmd.OpenReport "SQ FT/LN FT ITEMS REPORT REV", acPreview, , strWhere
    DoCmd.SendObject acSendReport, "SQ FT/LN FT ITEMS REPORT REV", acFormatPDF
    End Sub

    Could anyone give me the code to close the report after the report is sent?

    Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    DoCmd.Close

    with the appropriate arguments.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. automatic report export/emailing
    By broecher in forum Programming
    Replies: 6
    Last Post: 01-29-2015, 03:21 PM
  2. Emailing report in access
    By Robert2150 in forum Access
    Replies: 2
    Last Post: 09-27-2013, 10:39 PM
  3. Emailing Personalized Report
    By rgrwatson85 in forum Reports
    Replies: 3
    Last Post: 10-20-2011, 10:21 AM
  4. Emailing Report with Attachments
    By Rookie in forum Reports
    Replies: 1
    Last Post: 08-19-2011, 06:52 PM
  5. Emailing a report
    By prv in forum Access
    Replies: 1
    Last Post: 12-20-2010, 04:03 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums