How to Fix Access Report Showing #Name Error for Form Dates
Question details
The user needs to resolve an issue where a Microsoft Access report displays the #Name error instead of the expected date parameters passed from a selection form.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Generating a report that references date controls like txtStartDate and txtEndDate from a specific selection form.
- Observed behavior
- The report displays #Name in the date text boxes instead of the actual date values because the referenced form is closed before the report fully loads.
Verify that the form name and control names (e.g., txtStartDate, txtEndDate) exactly match the expressions written in your report's text box controls.
Keep the Selection Form Open While the Report Loads
The simplest and most common fix is to ensure the form containing the date parameters remains open until the report has completely loaded.
Referencing controls on an open form is a valid and highly common technique in Microsoft Access. However, this direct connection requires the source form to remain active in memory.
If the form is closed immediately after triggering the report, the report loses access to the text box values, resulting in the #Name error.
Open your Access database in Design View and locate the button on your selection form that triggers the report generation.
Look for the specific VBA command (like DoCmd.Close) or macro action that closes the current form immediately after opening the report.
Remove the close command so the form remains open in the background. Alternatively, you can set the form's Visible property to False to hide it without closing it.
Save your changes and run the process again to confirm the report now successfully pulls the dates and displays them properly instead of showing #Name.
Pass Dates Using OpenArgs or Query Parameters
For a more reliable design that allows you to safely close the selection form, pass the date values directly to the report upon opening.
Looking for a Free Office Suite? Try WPS Office
While Microsoft Access is a specialized database management tool, your everyday productivity needs like documents, spreadsheets, and presentations can be easily handled by WPS Office. It provides a lightweight, entirely free, and highly compatible alternative to Microsoft Office.
- 1. Download the installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install the software: Run the downloaded file and follow the straightforward on-screen instructions to complete the setup.
- 3. Open your files: Launch WPS Office and seamlessly open your existing Microsoft Office documents without worrying about formatting issues.

Frequently Asked Questions
Why does my Access report show #Name in text boxes?
The #Name error indicates that Microsoft Access cannot evaluate the expression in the text box. This usually happens if there is a typo in the control name, or if the report is referencing a control on a form that has already been closed.
Can I close the selection form after opening an Access report?
If your report's text boxes directly reference controls on the form (for example, using the syntax [Forms]![MyForm]![txtStartDate]), the form must remain open. Closing it severs the reference and causes errors. You can only close the form if you pass the data using OpenArgs or query parameters instead.
How do I hide a form instead of closing it in Access?
You can hide a form by setting its Visible property to False in your VBA code (e.g., Me.Visible = False) right after the command that opens the report. This keeps the form open in the background so the report can still read its values without cluttering the screen.




