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?" or Control Is Blank on Form Based on a Query


View products that this article applies to.

Symptoms

If you have a form that is based on a query, and the query contains multiple fields with the same name (such as FieldA from Table1, and FieldA from Table2), the control(s) on the form that are bound to that field name will be blank or may display the "#Name?" error.

↑ Back to the top


Cause

Because the same field name appears multiple times in the query that the form is based on, Access does not know which field to link to the control(s). Therefore, instead of making an assumption about which field to link to, it leaves the control(s) that are linked to duplicate field names blank or displays the "#Name?" error in the control.

↑ Back to the top


Resolution

To correct this behavior, rename the field in the query.

To change a field name in a query, follow these steps:
  1. In a query's Design view, place the insertion point in front of the first letter of the field name in the query design grid.
  2. Type the new name followed by a colon. Delete any names assigned by Access, but do not delete the field name or expression.
NOTE: If you change a field name in a query's Design view, it changes the heading in the query's Datasheet view and the field name in a form or a report based on the query. However, the underlying field name in the table does not change.

↑ Back to the top


References

For more information about changing a field name in a query , click Microsoft Access Help on the Help menu, type query design grid in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB209767, kbprb, kberrmsg

↑ Back to the top

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