How to Convert Access Report to PDF File?

Converting an Access database to PDF improves data security, ensures easy sharing, and maintains document integrity. Though a PDF file is universally accessible & prevents unauthorized edits, making it an ideal format for reports and records. Thus, if you are willing to convert Access report to PDF file, you are at the right place. Here, you will learn step-by-step methods for the conversion process.

How To Export Access Report To PDF File Via VBA

Rated Excellent on Trustpilot
Free MS Access Database Repair Tool
Repair corrupt MDB and ACCDB database files and recover deleted database tables, queries, indexes and records easily. Try Now!
Download
By clicking the button above and installing Stellar Repair for Access (14.8 MB), I acknowledge that I have read and agree to the End User License Agreement and Privacy Policy of this site.

Quick Navigation:

Why Convert Access File to PDF?

There are various benefits and advantages of converting Access to PDF, including:

  1. Universal Compatibility – PDF files are accessible from anywhere and on any device.
  2. Advanced Security Features – Allows password protection and restrictions.
  3. Keeps Formatting – Keeps layouts, fonts, and graphics intact.
  4. Easy Printing & Sharing – Ensures hassle-free distribution.

How to Import PDF Files Into Access Database?

You can import PDF file in Access database simply by adding them from the attachment field. Learn how it is to be done. Here we will perform this in two sections so that you can understand it more clearly.

1: By Adding An Attachment Field

2: Add PDF To Table

Step 1: By Adding an Attachment Field

  1. At first open your MS Access database and after that go to the Navigation pane.
  2. Now make a right-click on the Access table within which you need to add your PDF document.
  3. Tap to the “Design View” option. You will see that Access will display a table having the name of the field on it. Scroll down to this table and go to a blank row having no field name on it.
  4. Keep your mouse cursor on that particular row’s Field Name column. After that assign a name for this attachment field. Suppose, you want to keep the field name PDF for easy identification then type PDF over there.
  5. Just next to the name you have recently assigned you will see a drop-down menu of Data Type will appear to you. So, from this drop-down menu choose the “Attachment” data type. After that press the “Ctrl+S” to save up all the changes done by you.

Step 2: Add PDF to Table

After making the table in the database it’s time to insert PDF document into Access Database table.

  1. From the menu bar of your Access database tap to the “View” tab. After that tap to the “Datasheet View.” Keeping your table in datasheet view will help you in easy updating of the data in the table.
  2. Now come to that row which is having the record that you want to update. Suppose, you need to add your PDF document into the 20th row, then you need to scroll to that row.
  3. Go to the attachment field which you have added in the step 1. Now make double tap on that field for opening of the dialog Window of Attachments.
  4. Hit on the Add option and this will open the Window of Choose File. From this Window, you can choose your PDF attachment file.
  5. After the selection of the PDF file you want to add to your Access table. Tap on the “Open” button and then on the “OK” option.

You will see that your PDF file is added to the row of the table that you have selected.

Also Read: Convert Access Database to CSV File Without Losing Data!

How to Convert Access Report to PDF?

After learning how to open or import pdf file in Access database. It’s time to move into our next section i.e. how to convert Access report to PDF file.

Here is the step to convert Access report to pdf file. Follow it carefully:

  • Open your Access report.
  • After that go to your Access database menu bar Ribbon. Here tap to the External Data tab and then from the Export group choose the PDF or XPS option.

convert Access Report To PDF

  • Choose the file or folder path where you want to save your Access pdf file.
  • After that tap to the Publish.

convert Access Report To PDF 1

  • Tapping to the publish option will automatically open Access report in PDF file format.

Isn’t it easy…!

If you need to perform this task regularly then it becomes quite irritating to perform this manual step. At that time you need some simple solution. With just one single click, you can immediately export Access report to PDF file.

So, in our next step, we will learn how to export Access report to PDF using VBA.

How to Export Access Report To PDF File Via VBA?

In this section of my post, you will learn about how to design a VBA function that helps you to convert Access report to PDF file in just one single click of the button.

Now you do need not to go every time on your Access menu bar to convert Access report to pdf.

Steps For Making A VBA Function Which Saves The Access Report In PDF File Format

1. Add One Command Button Within Your Report

Try the following method if you are already having an Access report. If it’s not then make it first.

Open your Access database design view and then add one button on Report header section. Just as shown in figure.

Export Access Report To PDF File Via VBA 1

Assign the name of this button as cmd_exportPDF. For this perform the following steps:

  1. In the design view, choose the button.
  2. Press the ALT + Enter button from your keyboard to open the Property Sheet.
  3. Now tap on the Other tab and then on the Name
  4. After that you need have change your Name value to this; cmd_exportPDF.

2. Add code for the command button

To add up the code, you first need to add one On_Click event on the button.

  1. Keeping the above cmd button selected, once again go to the Property Sheet.
  2. Tap on the Event
  3. Search for On Click and then select…
  4. You will see a Choose Builder menu pop up on your screen. Select Code Builder and tap to the OK
  5. After this VBA Editor gets open on your screen.

You have to just copy the below code.

Remember: you have to update the values for file name &  folder Path. You can see in the comment section, that each one has an asterisk (*).

Function FileExist(FileFullPath As String) As Boolean
Dim value As Boolean
value = False
If Dir(FileFullPath) <> “” Then
value = True
End If
FileExist = value
End Function

Private Sub cmd_exportPDF_Click()

Dim fileName As String, fldrPath As String, filePath As String
Dim answer As Integer

fileName = “Member Contact Details” ‘filename for PDF file*
fldrPath = “C:\Users\Jessica\Desktop\PDF Exports” ‘folder path where pdf file will be saved *

filePath = fldrPath & “\” & fileName & “.pdf”

‘check if file already exists
If FileExist(filePath) Then
answer = MsgBox(prompt:=”PDF file already exists: ” & vbNewLine & filePath & vbNewLine & vbNewLine & _
“Would you like to replace existing file?”, buttons:=vbYesNo, Title:=”Existing PDF File”)
If answer = vbNo Then Exit Sub
End If

On Error GoTo invalidFolderPath
DoCmd.OutputTo objecttype:=acOutputReport, objectName:=Me.Name, outputformat:=acFormatPDF, outputFile:=filePath

MsgBox prompt:=”PDF File exported to: ” & vbNewLine & filePath, buttons:=vbInformation, Title:=”Report Exported as PDF”
Exit Sub

invalidFolderPath:
MsgBox prompt:=”Error: Invalid folder path. Please update code.”, buttons:=vbCritical

End Sub

These lines of code will:
  1. Check whether the PDF file having the same file name already present within the specified folder.

If it is there, then you will get a prompt message asking regarding the replacement of old file with the new one will comes up on your screen.

At this time if you select the “yes” option then your export Access report PDF process will be continued. If you press the “No” option then the process of conversion will be stopped.

  1. Suppose you have entered one folder path which doesn’t exist. At that time you will get a message regarding updating the folder path specified in the code. The process of exporting access reports to PDF will not be continued until and unless it is been corrected.
  2. After the successful exportation of the Access report, you will get a message indicating that “your PDF file is successfully saved now”.

Now it’s time to make a trial of your button.

Also Read: How to Convert ACCDB to MDB – MS Access Database Tips!

How to Convert Access File to PDF Online Free?

The best PDF converter tool is the Online PDF Converter. It is one of the free online services that can be used to convert Word, Excel, PDF, PowerPoint, or another file for free and successfully.

Here are the complete steps to use this service:

convert Access report to PDF file

  • After that, click on the “Convert” option.
  • Lastly, download the converted file instantly.

Frequently Asked Questions:

How Do I Get Full Access to A PDF?

To get full access to a PDF, open the PDF in Acrobat. Then, use the “Unlock” tool: Choose the “Tools” > “Protect” > “Encrypt” > “Remove Security.”

How Do You Create A PDF In Access?

To create a PDF in Access, you have to choose File >> Save As. Now, choose the File Format at a bottom of the window. Select the PDF from a list of available file formats.

How to Convert MDB File To PDF?

If you want to convert MDB file to PDF file format, you have to follow the below steps:

  1. Open MS Access.
  2. Launch a .MDB document.
  3. Choose the “File“->”Print
  4. After this, select printer “PDF4U Adobe PDF Creator”
  5. In case, to adjust the PDF generation options, you have to click on the “Property” button on the right.
  6. Click “OK
  7. Now, a dialog will popup, allot the folder & file name of a PDF document to be created.

Bottom Line

Now you must have enough idea on how to convert Access report to PDF file.  So, perform any operation of converting, importing and exporting your Access database effortlessly. Whether using built-in features, VBA scripting, or third-party tools, choosing the right technique ensures efficient and error-free conversion.

tip Still having issues? Fix them with this Access repair tool:

This software repairs & restores all ACCDB/MDB objects including tables, reports, queries, records, forms, and indexes along with modules, macros, and other stuffs effectively.

  1. Download Stellar Repair for Access rated Great on Cnet (download starts on this page).
  2. Click Browse and Search option to locate corrupt Access database.
  3. Click Repair button to repair & preview the database objects.

Pearson Willey is a website content writer and long-form content planner. Besides this, he is also an avid reader. Thus he knows very well how to write an engaging content for readers. Writing is like a growing edge for him. He loves exploring his knowledge on MS Access & sharing tech blogs.