You can also use SQL statements in many places where you can enter the name of a table, query, or field. For example, when you use a wizard to create a form or report that gets data from more than one table, Access automatically creates an SQL statement in the RecordSource property of the form or report. When you create a list box or combo box with a wizard, Access creates the SQL statement in the RowSource property of the list box or combo box. You can also use SQL statements in a few other places where a property calls for manipulation of data. It, with dozens of expressions added to it, selects records from a table or tables.
Variations are numerous, as the following examples make clear.
Spacing does not matter. Statements may be on more than one line. The semi-colon at the end is optional, although Access will stick one on if you leave it off. Type over old query to make a new one. Observe what data are displayed, how the results are organized, and try to figure out what happened.