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: #Error When Control Name Is Used in ControlSource Expression


View products that this article applies to.

This article was previously published under Q209785
Novice: Requires knowledge of the user interface on single-user computers.

↑ Back to the top


Symptoms

A field returns a "#Error" error message when the ControlSource property (bound field) contains the Name property in an expression. However, in an unbound text box, the same expression generates the expected value rather than "#Error."

↑ Back to the top


Cause

A circular dependency exits in the problem form or a report. Control names take precedence over field names when binding. Access does not provide a more descriptive error for circular references.

↑ Back to the top


Resolution

To reference the Name property in an expression, use an unbound text box. Otherwise, reconstruct the ControlSource property expression so that it does not reference the Name property.

Another alternative is to change the name on the form.

↑ Back to the top


More information

If you create a form based on a table or query and drag a numeric field onto the form, by default the ControlSource property and the Name property are given the name of the actual field in the underlying table or query. If you change the ControlSource property to an expression that includes the Name property, you see "#Error" in this field when you switch to Form or Datasheet view.

The following example demonstrates an expression within the ControlSource property:
Name:�������������� Person_ID
ControlSource: =[Person_ID] + 1

↑ Back to the top


Keywords: KB209785, kbusage, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 209785
Revision : 2
Created on : 6/24/2004
Published on : 6/24/2004
Exists online : False
Views : 339