You use the ! and . (dot) operators in an identifier to indicate the type of item that immediately follows.
The ! operator indicates that what follows is a user-defined item (an element of a collection). For example, use the ! operator to refer to an open form, an open report, or a control on an open form or report.
Identifier | Refers to |
---|---|
Forms![Orders] | The open Orders form |
Reports![Invoice] | The open Invoice report |
Forms![Orders]![OrderID] | The OrderID control on the open Orders form |
The . (dot) operator usually indicates that what follows is an item defined by Microsoft Access. For example, use the . (dot) operator to refer to a property of a form, report, or control.
Note You can also use the . (dot) operator to refer to a field value in an SQL statement, a Visual Basic for Applications method, or a collection. For example, the identifier Forms![Orders].Controls refers to the Controls collection of the Orders form. However, because the Controls collection is the default collection for forms and reports, it's usually not necessary to refer to it explicitly.