Error message in Access 2007 when you try to open a table or a query in design mode in a database that is from an earlier version of Access: "The expression you entered refers to an object that is closed or doesn't exist"

Symptoms

You open a database that is from an earlier version of Microsoft Access in Microsoft Office Access 2007. When you try to open a table or a query in design mode, you receive the following error message:
Microsoft Office Access

The expression On Click you entered as the event property setting produced the following error:
The expression you entered refers to an object that is closed or doesn't exist.

* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
* There may have been an error evaluation the function, event, or macro.

Cause

This issue may occur when a table or a query has the same name as a form or a report in the Access 2007 database.

Resolution

To resolve this issue, rename the form or the report so that it differs from the name of the table or the query.

Caution Name AutoCorrect fixes most issues that occur when you rename any forms, reports, tables, or queries. However, Name AutoCorrect does not repair tables, queries, or field name changes in macros or in code. Also, Name AutoCorrect does not track changes to form, report, or control names. You may have to fix some references manually. Therefore, make sure that you make a backup copy of the database before you make any changes.

To rename the form or the report in the database, follow these steps:
  1. Click the Microsoft Office Button, and then click Open.
  2. In the Open dialog box, select the database that you want to open, and then click Open.
  3. If you receive the following message, click Options, click Enable this content, and then click OK.
    Please enable code in this database using the security bar above or open this file from a trusted folder.
  4. Click the Microsoft Office Button, and then click Access Options.
  5. In the Access Options dialog box, click Current Database.
  6. Under Name AutoCorrect Options, make sure that the Perform name Autocorrect check box is selected. If it is not selected, click to select the Perform name Autocorrect check box. Then, close and reopen the database for the change to take effect.
  7. In the Navigation Pane, right-click the form or the report, and then click Rename.
  8. Type a new name for the form or for the report, and then press ENTER.
  9. On the Quick Access toolbar, click Save.
For more information about how to rename a form or a report, follow these steps:
  1. Click Microsoft Office Access Help, or press F1.
  2. Type rename or delete objects in the Search box.
  3. To view the topics, click Search.
Properties

Article ID: 926700 - Last Review: Oct 15, 2007 - Revision: 1

Feedback