In Lesson 15, "Creating a Simple Query," you created a simple query using the Simple Query Wizard. This wizard allows you to select the fields from a particular table and then create a standard select query. Although the Simple Query Wizard makes it easy to create a query based on one table, you will find that building more sophisticated queries is best done in the Query Design view. The Query Design view provides two distinct areas as you work. A Table pane shows you the tables currently being used for the query. The bottom pane, the Query Design grid (see Figure 16.1), enables you to list the fields in the query and select how these fields will be sorted or the information in them filtered when you run the query. Figure 16.1. The Query Design view is divided into a Table pane and a Query Design grid.
Opening a Query in Query Design ViewOne thing that you can do in the Query Design view is edit existing queries, such as the simple query that you created in the previous lesson. You can change the fields used in the query and change the action that takes place on that field (or fields) when you run the query. To open an existing query in Query Design view, follow these steps:
The query opens in the Query Design window. Starting a New Query in Query Design ViewCreating a new query from scratch in the Query Design view allows you to select both the tables and the fields that you use to build the query. To begin a new query in Query Design view, follow these steps:
The tables chosen for the query appear in the top pane of the Query Design view. Field names do not appear in the Query Design grid until you add them. Adding fields to the query is covered in the next section.
|