Part I: Access Building Blocks
132
FIGURE 4.2
The results of the query shown in Figure 4.1
In this case, you want Access to show you a datasheet of all customer names and addresses meeting
the query’s criteria (multiple products purchased in 2012). In this case, Access retrieves customer
names and cities from tblCustomers and then obtains the number of products from the tbl-
Products table, and the year of sale from the tblSales table. Figure 4.3 shows this relatively
complex query.
FIGURE 4.3
A more complex query returning customers that purchased more than one car in 2012
Access takes the information specified by the criteria, combines it, and displays in a single data-
sheet. This datasheet is the result of a query that draws from tblCustomers, tblSales, tbl-
SalesLineItems, and tblProducts. The database query performs the work of assembling all
the information for you. Figure 4.4 shows the resulting datasheet.