Results 1 to 3 of 3
  1. #1
    Ganymede is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    64

    Export Report to PDF

    I am attempting to create a Macro or Event Procedure that will export a report to PDF, and I'm running into a few problems.



    1. File Name - I want the file name to be equal to the value of the texbox on an open form. Is this possible?
    2. Hidden objects - The report contains text boxes that are supposed to remain invisible unless they contain text (this is done by event procedure). However, whenever I export with VBA or macro, those boxes are visible regardless of whether they contain text.

    Thanks

  2. #2
    RAshA.pro777 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2015
    Posts
    41
    Ok,
    1- you can not save your report each time in new name , but you can give it the default name to save ,
    2- i think your event procedure have an error because if you write your vba in report event to view the value in textbox and in other situation don't view ...then converted to pdf it's remain hidden if the textbox dont have value and will appear if the textbox have a value , i try it in my system

  3. #3
    Ganymede is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    64
    Update: I was able to complete the first step.
    Code:
    DoCmd.OutputTo acOutputReport, "ReportName", acFormatPDF, _
            "C:\Users\alek.pivec\Documents\" & Me.Textboxname & ".pdf"
    Replace "ReportName" with the name of your report and "Textboxname" with the name of your textbox.

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

Similar Threads

  1. export report to excel
    By AMRI YULIANDI in forum Reports
    Replies: 4
    Last Post: 12-11-2014, 07:10 AM
  2. Export Report to PDF
    By cuddles in forum Reports
    Replies: 10
    Last Post: 05-21-2014, 09:28 AM
  3. export report
    By slimjen in forum Forms
    Replies: 7
    Last Post: 04-24-2013, 08:14 AM
  4. Export report to jpg
    By isdm in forum Reports
    Replies: 1
    Last Post: 04-16-2010, 10:00 PM
  5. Export of Relationships Report
    By bar tomas in forum Reports
    Replies: 1
    Last Post: 04-09-2009, 09:03 AM

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