Microsoft Office Tutorials and References
In Depth Information
Creating Flexible Parameter Queries
Suppose that you prefer to see names listed in alphabetical order by person
name — or by company name, if there is no person name. In that case,
create a calculated field in Design view. You can name this field anything you
want; in Figure 2-13, we named the field CustLookup. The expression for
that field reads
CustLookup: IIf(IsNull([Last Name]),[Company],[Last Name] & “, “ & [First Name])
The IIf() expression says, “If the Last Name field is null, put the company
name in this field. Otherwise, put the person’s last name in the field,
followed by a comma, a space, and the person’s first name (Pines, Tori, for
example).” Setting the Sort row for that calculated field to Ascending order
puts records in alphabetical order by last name or company (if there is no
last name), as shown in Figure 2-13.
Book III
Chapter 2
Figure 2-13:
Sorting by
calculated
field sorts
by name or
by company
if the Last
Name field
is blank.
Creating Flexible Parameter Queries
A parameter query is a query that intentionally omits a piece of needed
information so that you can enter the information on the fly when you open the
query in Datasheet view. Suppose that you create a query that shows orders
Search JabSto ::




Custom Search