Share this Page URL

Chapter 9. Understanding Query Operators... > Understanding the Elements in Expres... - Pg. 302

Understanding Query Operators and Expressions · Round returns a numeric value rounded to the specified number of decimal places. · VBA 6.0 adds four specialized Format... functions: FormatCurrency , FormatDateTime , FormatNumber , and FormatPercent that you can substitute for the generic Format function in VBA code, but not in queries. · The VBA Editor, common to all VBA-enabled Office 2000 members, replaces the Module window of Access 97 and earlier. · The Debug window of prior versions of Access now is called the Immediate window. You use the VBA Editor's Immediate window in this chapter to experiment with expressions and functions. Understanding the Elements in Expressions An expression is a statement of intent. If you want an action to occur after meeting a specific condition, your expression must specify that condition. To select records in a query that contains ZIP field values of 90000 or higher, for example, you use the expression ZIP>=90000 You can use expressions in arithmetic calculations also. If you need an ExtendedAmount field in a query, for example, you use ExtendedAmount: Quantity * UnitPrice as the expression to create calculated values in the data cells of the ExtendedAmount column. To qualify as an expression, a statement must have at least one operator and at least one literal, identifier, or