Creating a Query

After you create your tables and place data in them, you’re ready to work with queries. To begin a query, choose the Create tab of the Ribbon, and click on the Query Design button in the Other group. Access opens the query designer in response.

Figure 36-4 shows two windows. The underlying window is the Query Designer. Floating on top of the designer is the Show Table dialog box. The Show Table window is modal, which means that you must do something in the dialog box before continuing with the query. Before you continue, you add the tables required for the query. In this case, tblProducts is highlighted to be added.

Figure 36-4. The Show Table dialog box in the Query Design window.

The Show Table dialog box shown in Figure 36-5 displays all tables and queries in your database. Double-click on tblProducts to add it to the query design. Close the Show Table dialog box after adding tblProducts. Figure 36-5 shows tblProducts added to the query.

Figure 36-5. The Query Design window with tblProducts added to the Query Designer.

To add additional tables to the query, right-click on the query’s design surface and select Show Table from the shortcut menu that appears. Alternatively, drag tables from the Navigation pane on to ...

Get Office 2007 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.