Databases Reference
In-Depth Information
In Access, you create queries using the Query window, which has two panes. The upper portion of the win-
dow contains a field list for each table you want to query. The lower pane contains the design grid , the area
in which you specify the format of your output, the fields to be included in the query results, a sort order
for the query results, and any criteria the records you are looking for must satisfy.
The following figures and examples will show you how to retrieve data using the Access version of QBE.
33
NOTE
If you plan to work through the examples in this chapter using a computer, you should use a copy of the Premiere Products data-
base because the version of the database used in subsequent chapters does not include the changes you will make.
SIMPLE QUERIES
To include a field in the results of a query, you place it in the design grid.
EXAMPLE 1
List the number, name, balance, and credit limit of all customers in the database.
To include a field in an Access query, double-click the field in the field list to place it in the design grid,
as shown in Figure 2-3. The check marks in the Show check boxes indicate the fields that will appear in the
query results. To omit a field from the query results, remove the check mark from the field's Show check box.
Click the Run
button to view the
query results
Fields in the
Customer
table field list
Fields
included in the
design grid
Check marks
indicate fields to appear
in the query results
FIGURE 2-3 Fields added to the design grid
 
 
Search WWH ::




Custom Search