PDF Conversion Issues

Fix #Name? Date Parameters in Microsoft Access PDF Reports

Anum MushtaqAnum Mushtaq Nov 25, 2026 868 views

Question details

Prevent parameter dates or calculated values from showing #Name? when an Access report is exported to PDF.

Fix #Name? Date Parameters in Microsoft Access PDF Reports
Product
Microsoft Access
Device & OS
not provided
Scenario
A report uses values from a parameter form, and a VBA procedure opens the report and closes the form before exporting the report to PDF.
Observed behavior
The exported PDF may show #Name? where parameter dates or calculated values should appear.
Before you start

Identify the form and controls referenced by the report, and locate the VBA procedure that opens the report and closes the form. Confirm the report name and choose a writable location for the PDF.

Solution 1Recommended

Keep the Parameter Form Open Until the PDF Export Finishes

Use this approach when the report refers to controls on a form that closes before the report finishes rendering.

A hidden form remains open, so report expressions can still refer to its controls. If the report stays open after export, keep the form open until the report is closed.

1
Find the export procedure

Open the parameter form in Design View, select the button that runs the report, and open its On Click event in the VBA editor.

2
Hide the form instead of closing it

Replace the premature form-closing command with Me.Visible = False in the form's button procedure. Leave the form open while the report is processed.

3
Open and export the report

Use DoCmd.OpenReport "ReportName", acViewPreview, followed by DoCmd.OutputTo acOutputReport, "ReportName", acFormatPDF, "C:\Reports\Report.pdf". Replace the report name and output path with your own.

4
Close the objects after export

After OutputTo completes, close the report with DoCmd.Close acReport, "ReportName", then close the parameter form. If users need to keep viewing the report, leave the hidden form open until they close the report.

5
Check the PDF

Open the exported PDF and verify that the dates and calculated values appear. If they do not, check the report expressions and referenced form control names in Design View.

Keep the Parameter Form Open Until the PDF Export Finishes
Handle export errors: Add error handling to the VBA procedure so the form can be shown again if opening or exporting the report fails.
Free Microsoft Office alternative

Work With Documents and PDFs in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents and PDFs. Its format compatibility helps you move existing files into your workflow, although it does not fix Microsoft Access report or VBA errors.

Open and review exported PDF reportsCompatible with Microsoft Word, Excel, and PowerPoint formatsFamiliar interface for working with existing Office documentsFree, lightweight tools for everyday document tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Access report show #Name? in the exported PDF?

One possible cause is that a report expression refers to a control on a parameter form that was closed before rendering finished. Keep the form open during export and check the expression and control names in report Design View.

Can I hide the parameter form while the report is exported?

Yes. In the form's VBA procedure, use Me.Visible = False instead of closing the form before opening and exporting the report.

When can I close the parameter form?

Close it after the PDF export finishes and the report no longer needs its values. If the report remains open for preview, keep the form open until the report is closed.

Can WPS Office fix the Access report error?

No. Fix the form references or export procedure in Microsoft Access. You can then open the exported PDF in WPS Office to review it.