Datasheet

The Query By Design interface
Go to your sample database and select the Queries tab. At the top, double-click
“Create query in Design view.” The Show Table dialog box opens, sitting on
top of a blank Query By Design (QBD) interface, as shown in Figure 1-15. Some
also call this the query grid or design grid.
When creating your “question” of the data, the first thing you must deter-
mine is from which tables you need to retrieve data. The Show Table dialog
box allows the user to select one or more tables. As you can see in Figure 1-15,
there are also tabs for Queries and Both. One of the wonderful features of
queries is that you are not limited to just querying directly off the table. You
can create queries of other queries.
For this first query, select the CustomerMaster table, either by selecting the
table in the list and clicking Add or by double-clicking the table in the list.
Now that you have selected the table from which you want to retrieve data,
you must select the fields of that table that you would like to retrieve.
The QBD is divided into two sections. The top half shows the tables or
queries from which the query will retrieve data. The bottom half shows the
fields from which the query will retrieve data. You can also add your own “cal-
culation” fields that perform operations on other fields, and output the result.
You will notice in Figure 1-16 that the CustomerMaster table at the top half
of the QBD lists all the fields, but has an asterisk at the top of the list. The aster-
isk is the traditional database symbol, which means that all fields from that
table will be in the output.
Figure 1-15 The Show Table dialog allows you to select
the tables or queries to which to add the Query By Design.
26 Chapter 1
05_59978X ch01.qxp 12/1/05 7:46 PM Page 26