Microsoft Access 2010 Bible

(Rick Simeone) #1

Part I: Access Building Blocks


140


The fields are added to the QBE grid in the order in which they occur in the table.

You can also add all the fields in the table by clicking on the Field List’s header (where it says
tblProducts in Figure 4.10) to highlight all the fields in the table. Then drag the highlighted
fields to the QBE grid.

Alternatively, click and drag the asterisk (*) from the Field List to the QBE grid (or double-click
the asterisk to add it to the QBE grid). Although this action doesn’t add all the fields to the QBE
grid, the asterisk directs Access to include all fields in the table in the query.

FIGURE 4.10

Adding the asterisk to the QBE grid selects all fields in the table.


Tip
Unlike selecting all the fields, the asterisk places a reference to all the fields in a single column. When you drag
multiple columns, as in the preceding example, you drag names to the QBE grid. If you later change the design
of the table, you also have to change the design of the query. The advantage of using the asterisk for selecting
all fields is that changes to the underlying tables don’t require changes to the query. The asterisk means to
select all fields in the table, regardless of the field names or changes in the number of fields in the table.


Caution
The downside of using the asterisk to specify all fields in a table is that the query, as instructed, returns all the
fields in a table, regardless of whether every field is used on a form or report. Retrieving unused data can be a
very inefficient process. Very often, performance problems can be traced to the asterisk returning many more
fields than necessary to a form or report.


Displaying the Recordset


Click the Run button or the Datasheet button to view the query’s results (see Figure 4.11).
Free download pdf