Topic 8: How to write a query

Go to Topic 9 * Access Database Skills Table of Contents * Technology Skills

  1. Open the database window by pressing F11 or clicking the database window icon on the toolbar. (Some databases will open directly to the database window, while others have a startup form that appears first.)
  2. Click the Queries tab.
  3. Click New to write a new query. (The "Design" button will open the design grid for an existing query and the "Open" button will open the datasheet view for an existing query.)
  4. Select Design View to go directly to the query design grid. (Select one of the other options to use a wizard to create a query.)
  5. Select the tables you want in the query by clicking the table name(s) and clicking the "Add" button. Then click "Close." (If you want to add another table later, click "Show Tables" on the toolbar or right click on the design grid and select "Show Tables" from the popup menu.)
  6. Use the query design grid to write the query. Put the field names in the first row by typing, selecting field names from the dropdown list, or dragging the field names from the field list shown at the top of the screen.
  7. The name of the table that holds that field appears automatically in the second row of the grid.
  8. Use the other rows of the design grid to specify how you want the query to be sorted and to specify any criteria for selecting records.
  9. Click the Run icon (an exclamation point (!)) to run the query.
  10. Use File, Save to give the query a name and to save it.

How to write a query