Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2013
    Posts
    82

    Unanswered: Email Report as PDF

    I have this command button to print current record to a report:


    **********************************
    Private Sub Command268_Click()
    Dim strDocName As String
    Dim strWhere As String
    strDocName = "AFR"
    strWhere = "[WorkorderID]=" & Me!WorkorderID
    DoCmd.OpenReport strDocName, acPrint, , strWhere

    End Sub

    **********************************

    Could this be modified to email the report as a PDF attachment?

  2. #2
    Join Date
    Dec 2013
    Posts
    4

    This is the code I use to email reports

    Code:
    DoCmd.SendObject acSendReport, report name, acFormatPDF, email addresses seperated by semicolons, , , email subject, , True

  3. #3
    Join Date
    Aug 2013
    Posts
    82
    Doesn't this code send all records?

  4. #4
    Join Date
    Dec 2013
    Posts
    4
    it might in your scenario.
    In mine, I am pulling the data set I want when the form opens and this is just my "email" button on the form.

  5. #5
    Join Date
    Aug 2013
    Posts
    82
    Thanks but it doesn't send the report from the current record.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •