Creating PDF files from within Microsoft Access

(Updated 2010-09-29)

The preferred solution in Access 2003 and older is to use Stephen Leban's A2000ReportToPDF.  It is free, works well and Stephen Leban's was a fellow Access MVP.  A2000ReportToPDF is an Access 2000 database containing a function to convert Reports and Snapshot files to PDF documents. No PDF Printer driver is required.   However Lebans; solution requires using the Snapshot printer format to create the PDF.  Snapshot files can't be created in Access 2010 so you won't be able to use Leban's solution then.

Access 2007 and newer now have a built in PDF report creator.

Creating a report for one record

In Access 2003 and newer you can pass OpenArgs to the report.

docmd.OpenReport "Name of report",acViewNormal,,,,"1234"

The filter in the reports OnOpen Event might look like

Me.Filter = "ShipmentsID=" & Me.OpenArgs
Me.FilterOn = True

Also see Sample Code illustrating looping through a DAO recordset to create multiple PDF reports.

The following have been specifically mentioned as being able to be automated.

I don't know which of the following can be automated.  That is you the programmer would like to programmatically control the output directory and file name.

  • Freeware method  (dated given the above but still may be of interest)
       - Install Postscript printer
       - Ghostscript
       - Ghostview (Note: printing postscript files from Ghostview may require manually deleting *.tmp files located in c:\winnt\system32\spool)
       - redmon (Printer to file redirection software)
       - change the default printer just while printing to the PDF
        Systemically OutPut Access Report To PDF
        VBpdf.zip (despite the name this is a link to a web page.)   (New2005-04-27)
  • Free PDF (Too much advertising for my tastes but this utility does the work of the above freeware method.

Notes

[ Third Party Utilities | AccessMain ]

Auto FE Updater   Auto FE Updater distribute new and updated Front End databases to your users with several mouse clicks.

Wrench and gear Granite Fleet Manager - the best designed fleet maintenance tracking and management system available

Comments email Tony  Search Contact Tony's Blog Privacy Policy Table of Contents

Website copyright 1995-2013 Tony Toews