If you are entering an expression that is longer than the standard input area in a property sheet, a design grid, or an action argument, you can type the expression in the Zoom box. To open the Zoom box, press SHIFT+F2 when the focus is where you want to enter the expression.
When you enter an expression in a property sheet, a design grid, or an action argument, Microsoft Access:
Note Calculated control expressions are always preceded by an equal sign (=).
Using functions and properties in international versions of Microsoft Access
When you enter a function or property in an expression in most international versions of Microsoft Access:
However, in Visual Basic for Applications code, you must type the English function or property name and use a comma (,) as a list separator.
Entering object names
Brackets ([ ]) around a field, control, or property in an identifier indicate that the element is the name of a table, query, form, report, field, or control.
When you type an object name in an identifier, you surround the name with brackets if it contains a space or a special character, such as an underscore. If the name doesn't contain a space or a special character, you can type the name without brackets. Microsoft Access inserts brackets automatically (with two exceptions noted below).
For example, you can type the following expression as a setting for the ControlSource property to calculate the sum of the values in the Freight and OrderAmount fields:
= Freight + OrderAmount
Microsoft Access displays the expression as follows:
= [Freight] + [OrderAmount]
Note In a ValidationRule property setting or in a Criteria cell in the query design grid, Microsoft Access doesn't always automatically insert brackets around a name. If you are entering an object name, be sure to type brackets around it. Otherwise, Microsoft Access may assume you are entering text and may insert double quotation marks.
Entering date/time values
Number signs (#) around an element of an expression indicate that the element is a date/time value. Microsoft Access automatically evaluates a value surrounded by number signs as a date/time value and lets you type the value in any common date or time format.
You don't have to type number signs around a date/time value in a validation expression or a criteria expression for a field whose data type is Date/Time. You can type the value in any common date or time format and Microsoft Access automatically inserts number signs around the value.
Microsoft Access displays the value according to the settings in the Regional Settings Properties dialog box in Windows Control Panel. You can change the output format of a date by using the Format property.
Entering text
Double quotation marks around an element of an expression indicate that the element is text.
When you type text in a validation or criteria expression, you can type the text without double quotation marks and Microsoft Access will insert them automatically.
For example, if you type the expression Paris, Microsoft Access displays the expression as follows:
"Paris"