How to Export Individual Access Report Records as Separate PDF Files
Question details
The user needs to export a single Microsoft Access report into multiple separate PDF files, where each PDF represents an individual record and is named dynamically based on a unique field value.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Generating individual PDF files for specific database records directly from an Access report using a custom identifier (like DocNum or CTOCUNUM).
- Observed behavior
- Instead of unreliably splitting a master multi-page PDF report by page numbers, the user must filter the report by individual record identifiers and export them one by one.
Ensure you have basic familiarity with Microsoft Access VBA (Visual Basic for Applications) and that the table or query feeding your report contains a unique identifier field (such as DocNum) to isolate individual records.
Use VBA and DAO Recordset to Filter and Export Records
Write a VBA script to loop through a DAO recordset, filter the report for each specific record, and export it as an independent PDF.
Rather than thinking in terms of printed pages, the most reliable method is to filter the report by the data that represents each record. By identifying a key field (e.g., DocNum or CTOCUNUM), you can use VBA to restrict the report to one record at a time and output it securely to a designated folder.
In your Microsoft Access database, press ALT + F11 to open the VBA Editor. You can create a new Module or place the code within the OnClick event of a command button on your form.
Write an SQL query to retrieve the relevant key values you wish to export. For example: Dim rst As DAO.Recordset Set rst = CurrentDb.OpenRecordset("SELECT * FROM Documents WHERE DocNum LIKE '*24-52*'")
Create a Do While Not rst.EOF loop. Inside the loop, construct the unique file path using the key field to name the PDF dynamically: strFullPath = "C:\Your\Path\Here\" & rst.Fields("CTOCUNUM") & ".pdf"
Use the DoCmd.OutputTo command to generate the PDF. Pass the report name and the generated file path: DoCmd.OutputTo acOutputReport, "YourReportName", acFormatPDF, strFullPath, False. (Setting the last argument to False prevents the PDF from opening automatically after creation).
Before closing your loop, use rst.MoveNext to proceed to the next record in your dataset, ensuring all queried records are exported individually.

Looking for a Lightweight Alternative for Your Office Needs?
While Microsoft Access handles complex relational databases, WPS Office is the perfect free, lightweight, and highly compatible alternative for your everyday document, spreadsheet, presentation, and PDF management needs.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the suite on your device.
- 3. Manage Your PDFs and Documents: Open your generated PDF reports, Word documents, or Excel files directly in WPS Office to edit, organize, or share them effortlessly.

Frequently Asked Questions
Can I split an Access report into separate PDFs without using VBA code?
Natively within Microsoft Access, there is no reliable way to split a report into individual PDFs per record without VBA. While you could export the entire report as a single multi-page PDF and use a third-party PDF splitter tool, this method is unreliable if a single record happens to span across multiple pages.
Why do my exported PDFs keep opening automatically and interrupting the process?
This happens if the 'AutoStart' argument in your DoCmd.OutputTo code is set to True. To stop the PDFs from opening automatically, locate the DoCmd.OutputTo line in your VBA code and change the final argument to False, or simply omit it.
How do I ensure the dynamically generated filename is valid?
When building your file path (e.g., using rst.Fields("DocNum")), ensure that the data in that field does not contain characters that Windows forbids in filenames, such as slashes (/, \), colons (:), asterisks (*), question marks (?), quotes ("), or pipes (|). You may need to use a VBA Replace function to sanitize the string if your field contains these characters.




