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 if the ZIP field has a numeric data type. Arithmetic calculations are expressions also. If you need an ExtendedAmount field in a query, for example, 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 function. In some cases, such as simple query criteria and field-validation rules, the equals operator (=) is inferred. The following list describes these elements:
When literals, identifiers, or functions are used with operators, these combinations are called operands. The following sections explain these four elements of expressions more thoroughly. Note Expressions in this book appear in monospace type to distinguish expressions from the explanatory text. Operators, including symbolic operators, built-in functions, and other reserved words and symbols of VBA, are set in monospace bold type. (VBA reserved words appear in blue color in the Code-Editing window of modules.) SQL operators and names of Access objects are set in monospace type; by convention, SQL-92 reserved words are capitalized. |