Others

How to Fix Access Report Showing #Name Error for Form Dates

Bushra ParveenBushra Parveen Nov 2, 2026 868 views

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.

How to Fix Access Report Showing #Name Error for Form Dates
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.
Before you start

Verify that the form name and control names (e.g., txtStartDate, txtEndDate) exactly match the expressions written in your report's text box controls.

Solution 1Recommended

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.

1
Locate the macro or VBA code

Open your Access database in Design View and locate the button on your selection form that triggers the report generation.

2
Find the close command

Look for the specific VBA command (like DoCmd.Close) or macro action that closes the current form immediately after opening the report.

3
Modify the form behavior

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.

4
Test the report

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.

Form Lifecycle: By keeping the form open in the background, the report maintains its connection to the form's controls, successfully reading txtStartDate and txtEndDate.
Free Microsoft Office alternative

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. 1. Download the installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install the software: Run the downloaded file and follow the straightforward on-screen instructions to complete the setup.
  3. 3. Open your files: Launch WPS Office and seamlessly open your existing Microsoft Office documents without worrying about formatting issues.
Fully compatible with Microsoft Office formats, including Word (.docx), Excel (.xlsx), and PowerPoint (.pptx).Lightweight design ensuring blazing fast startup times even on older hardware.All-in-one workspace featuring Writer, Spreadsheet, Presentation, and advanced PDF tools.Familiar tabbed user interface that requires zero learning curve for easy migration.
microsoft office alternative - wps office

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.