ACC2: Expression Builder Creates Incorrect Section Syntax

Last reviewed: May 14, 1997
Article ID: Q119805
The information in this article applies to:
  • Microsoft Access version 2.0

SYMPTOMS

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

When you use the Expression Builder to refer to a form or report's Section property, the syntax created by the Expression Builder is incorrect.

CAUSE

The Expression Builder incorrectly references sections as if they were controls on the form or report.

RESOLUTION

To reference a form or report's Section property, create the expression manually instead of using the Expression Builder.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 2.0. This problem no longer occurs in Microsoft Access version 7.0.

MORE INFORMATION

Steps to Reproduce Problem

  1. Add a command button to the form header section of any form.

  2. In the command button's OnClick property field, choose the Build button.

  3. In the Choose Builder box, select Code Builder, and then choose OK.

  4. Choose the Build button on the form module's toolbar.

  5. In the Expression Builder, select Detail in the second column, and Visible in the third column, and then choose the Paste button.

  6. Choose the "=" button, and then type "0" (without the quotation marks). The expressions should read as follows:

          Me![Detail].Visible = 0
    

  7. Choose OK.

  8. Close the form module, and then view the form in Form view.

  9. Choose the new command button. Note that you receive the error message:

          Invalid reference to field 'Detail'
    

    The correct expression should read as follows:

          Me.Section(0).Visible = 0
    

REFERENCES

For more information about the Expression Builder, search for "Expression Builder," and then "Expression Builder" using the Microsoft Access Help index.


Additional query words: wizard
Keywords : ExrBldr kberrmsg kbusage
Version : 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbworkaround


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 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.