Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Name AutoCorrect May Not Repair Form


View products that this article applies to.

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 '<Table or Query Name>'. Make sure it exists and the name is spelled correctly.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Status

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

↑ Back to the top


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.

↑ Back to the top


References

For additional information about how Name AutoCorrect works and what it repairs and doesn't repair, click the article number below to view the article in the Microsoft Knowledge Base:
231745 ACC2000: How does Name AutoCorrect work and what does it repair.
For additional information about how Name AutoCorrect works for converted databases, click the article number below to view the article in the Microsoft Knowledge Base:
230616 Q230616 Name AutoCorrect not working in a converted database.
For additional information about how Name AutoCorrect works with imported objects, click the article number below to view the article in the Microsoft Knowledge Base:
231676 ACC2000: Name AutoCorrect not repairing imported objects.

↑ Back to the top


Keywords: KB230741, kbbug

↑ Back to the top

Article Info
Article ID : 230741
Revision : 2
Created on : 6/29/2004
Published on : 6/29/2004
Exists online : False
Views : 343