Microsoft KB Archive/230741

= ACC2000: Name AutoCorrect May Not Repair Form =

Article ID: 230741

Article Last Modified on 6/29/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q230741



Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access database (.mdb).



SYMPTOMS
Even though you have enabled Name AutoCorrect, when you open a form after a change to a field name, a query name, or a table name, you experience one of the following problems:  The field on the form shows #Name?

-or- You are prompted for the old field name.

-or- You receive the following error message:

The Microsoft JET Database Engine could not find the input table or query ''. Make sure it exists and the name is spelled correctly.





CAUSE
This behavior can occur under the following conditions:
 * The form contains a SQL SELECT statement in the record source of the form, and the field name that was changed is referred to in the ControlSource property of a control.

-or-
 * The field name that was changed is referred to in either the Filter property or the OrderBy property of the form.

-or-
 * The form was imported or converted from an earlier version of Microsoft Access or was created when the Track Name AutoCorrect option was disabled. Therefore, the form does not have the name map information that Microsoft Access needs to repair name changes in the form.



RESOLUTION
Manually change the form to refer to the new field name, query name, or table name.

If the form is based on a SQL SELECT statement, you can prevent this problem from occurring again by basing the form on a saved query. This enables Name AutoCorrect to repair the field name in the query and then to repair the form based on the query.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
If the record source for a form is a SELECT statement, Name AutoCorrect repairs the SQL statement, but it does not repair any controls on the form whose ControlSource property is the old field name. Therefore, the control will show #Name?

If either the Filter or OrderBy properties of the form contains the old name of the field, Microsoft Access 2000 prompts you for the value when you open the form if the field name in these properties cannot be found. Name AutoCorrect does not repair changes to field names in either the Filter or OrderBy properties.

If you imported or converted the form or if the Track Name AutoCorrect option was disabled when you created the form, the form does not have the name map information that Microsoft Access needs to repair name changes.

To have Microsoft Access 2000 create the name map information for the form, be sure Track Name AutoCorrect Info and Perform Name AutoCorrect are enabled. To do so, on the Tools menu, click Options, and then click the General tab. If not already selected, click to select the Track Name AutoCorrect Info and Peform Name AutoCorrect check boxes. This enables Name AutoCorrect.

After you have enabled Name AutoCorrect, open the source of the form in Design view and save it, and then open the form itself in Design view and save it. This causes Microsoft Access to create the name map for the form and its source.

<div class="references_section">