Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 4: Selecting Data with Queries


145



  1. Click to the left of the D in the Description column and enter ProductDescription: to the
    left of the field name.


When you run the query, the aliases you created appear as the column headings. Figure
4.15 shows both the query in Design view and the query’s datasheet. Notice that the
ProductID and Description column sport their new aliases instead of their respec-
tive field names.


FIGURE 4.15
Aliases can help users understand data.
Alias

Caution
Use aliases with caution. Because an alias masks the name of the field underlying a datasheet, it’s easy to
become confused about which column headings are aliases and which are field names. It is a complete waste
of time looking for a field named ProductDescription, based on a datasheet column heading. It would be
nice if Access somehow distinguished between aliases and field names in Datasheet view, but the only way to
know for sure is to examine the query’s design. Also, the alias is how the field is named when used in a form or
report.


Showing a field
While you’re performing queries, you might want to show only some of the fields in the QBE grid.
Suppose, for example, you’ve chosen FirstName, LastName, Address, City, and State.
Then you decide that you want to temporarily look at the same data, without the State field. You
Free download pdf