Creating Queries  «Prev  Next»
Lesson 5Using the Query Design view
Objective Identify the parts of the Query Design window and what they do.

Using Query Design View

Although the Query Design view looks pretty daunting, it should not look completely unfamiliar. The Advanced Filter/Sort window is very similar to the Query Design view. The following MouseOver identifies the different parts of the window and what they do.

  1. View Datasheet button
  2. Save button: Saves the query design
  3. Query Type button
  4. Show Table button: Displays Show Table dialog box so that you can add tables to the query
  5. Totals button: Displays or hides Total line in grid
  6. Tables pane: Displays tables and their fields for use in the query
  7. Query by Design grid: Do the query here
  8. You can click and drag the pane divider to change the size of the panes.
  9. Field row: Shows fields used in the query
  10. Table row: Lists the table each field is from
  11. Total row: Allows you to group and summarize query results
  12. Sort: Allows you to choose a sort order for the query
  13. Criteria: Specify criteria in this row
  14. Or: Specify “or” criteria in this row

Query Design View

The query Design view has a shortcut that can help you and here is how it works:
  1. Open your query in Design view (or create a new query, and add the fields you want to use). This example uses the Products table, and includes the ProductName and Price fields.
  2. Sort your table so that the records you are most interested in are at the top. If you want to find the most expensive products, then add a descending sort on the Price field.
  3. In the Query Tools | Design.Query Setup.Return box, choose a different option.
The standard option is All, which gets all the matching records. However, you can choose 5, 25, or 100 to get the top 5, 25, or 100 matching records, respectively. Or, you can use a percentage value like 25 percent to get the top quarter of matching records. In the next lesson create a query in Design view.

Ad SQL Guide