ACC2: Expression Builder Creates Incorrect Section Syntax

ID: Q119805


The information in this article applies to:


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. 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          : kberrmsg kbusage ExrBldr 
Version           : 2.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: April 6, 1999