ACC: #Error When Control Name Used in ControlSource Expression

Last reviewed: May 7, 1997
Article ID: Q90860
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

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

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."

NOTE: The Name property is called the ControlName property in Microsoft Access versions 1.0 and 1.1.

CAUSE

There is a circular dependency in either a form or a report. Control names take precedence over field names when binding. Microsoft Access currently does not provide a more descriptive error for circular references.

RESOLUTION

If you need 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.

STATUS

This behavior is by design.

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 will be 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 will 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


Additional query words: pounderror
Keywords : ExrOthr kberrmsg kbusage
Version : 1.0 1.10 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 7, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.