Building a Query by Using a Wizard

Just as the Table Wizard facilitates the process of creating tables, the Simple Query Wizard helps you to build basic queries. Here's how you use it:

  1. Select the Queries icon from the list of objects in the Database window.

  2. Double-click the Create Query by Using a Wizard icon. The Simple Query Wizard appears (see Figure 6.12).

    Figure 6.12. The Simple Query Wizard.

    graphics/06fig12.jpg

  3. From the Tables/Queries drop-down list box, select the table or query on which you want to base the query. Then select the fields that you want to include in the query. In the example in Figure 6.13, the Customers table from the Northwind database is selected, and the CustomerID, CompanyName, ContactName, ContactTitle, Country, and Phone fields are selected from the table.

    Figure 6.13. Choosing the table and fields for the output of the query.

    graphics/06fig13.jpg

  4. Click Next to continue with the wizard. The second and final step of the Simple Query Wizard prompts you to name the query and allows you to either immediately run the query or modify the design of the query (see Figure 6.14).

    Figure 6.14. Naming a query and opening it to view its design.

    graphics/06fig14.jpg

  5. Click Finish to complete the process.



    Part III: Creating Your Own Database and Objects
    Part V: Advanced Topics