MS Access for the Business Environment: Create a PivotChart View in Access - Page 3
August 4, 2003
As in our previous lesson, we notice that the joins / relationships have been placed automatically. We review them for correctness, as always, and find them to be adequate. Next we select destination fields to determine the result dataset that the query will generate.
For each of the tables that follow, double-click the indicated fields to place it in the corresponding field of the matrix in the bottom half of the Select Query dialog.
The Select Query dialog displays the newly added tables and fields, appearing as partially shown in Illustration 4.
Now, let's run the query and examine the result set that it returns.
The query runs, and returns the data set, whose size is 2,155 rows, as partially displayed in Illustration 5.
Let's restrict our query to United States customers.
The Select Query dialog reappears.
The Country field appears in the field's matrix, in the lower half of the Select Query dialog, to the right of existing fields.
The Country field appears as shown in Illustration 6.
We can quickly verify that only U.S. Regions (that is, States, in this table of the Northwind database) appear.
The Save As dialog appears.
The completed Save As dialog appears as shown in Illustration 7.
We have now created and saved the new query in our Access database. We will base our PivotTable view, and thus our PivotChart view, upon this query, to demonstrate the steps involved.
We are returned to the Database window, where we can see our new query appears among the queries list.
As we have said before, a PivotTable view can be constructed for a table or a query. We created a custom query here, upon which to base a PivotTable creation, which we will, in turn, use as the basis for a PivotChart view.