ACC: Syntax for Using Object Variables in Expressions (133228)
The information in this article applies to:
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q133228
Moderate: Requires basic macro, coding, and interoperability skills.
SUMMARY
When you create expressions in Microsoft Access using Visual Basic for
Applications or Access Basic, you can use variables to refer to objects,
such as controls, forms, reports, and recordsets. However, when you
reference object variables, you cannot use the exclamation point (!) as the
identifier operator. Instead, you use parentheses, as in the following
example:
Forms("MyForm")(VarX) = "Any Value"
REFERENCES
For more information about identifiers in expressions, search the Help
Index for "identifiers," or ask the Microsoft Access 97 Office Assistant.
Modification Type: | Major | Last Reviewed: | 5/7/2003 |
---|
Keywords: | kbinfo kbusage KB133228 |
---|
|