Microsoft Office Tutorials and References
In Depth Information
Taylor wants to view the same data that appears in the qryLargeContractAmounts
query for customers with the highest 25% contract amounts. You will modify the query
and then use the Top Values property to produce this information for Taylor.
Based on the number or
percentage you enter, a
top values query selects
that number or percentage
of records starting from
the top of the recordset.
Thus, you usually include a
sort in a top values query
to display the records with
the highest or lowest val-
ues for the sorted field.
To set the Top Values property for the query:
1. Open the Navigation Pane, open the qryLargeContractAmounts in Datasheet
view, and then close the Navigation Pane. Access displays 22 records, all with
ContractAmt field values greater than $25,000, sorted in descending order by the
2. Click the Home tab, and then switch to Design view.
3. In the Query Setup group on the Query Tools Design tab, click the Return arrow
(with the ScreenTip “Top Values”), and then click 25% . See Figure 5-29.
Creating the top values query
Return (Top Values)
text box and arrow
If the number or percentage of records you want to select, such as 15 or 20%,
doesn’t appear in the Top Values list, you can type the number or percentage in
the Return text box.
4. Run the query. Access displays six records in the query recordset; these records
represent the customers with the highest 25% contract amounts (25% of the origi-
nal 22 records). See Figure 5-30.
Top values query recordset
top 25% of the records
selected in descending order
by the ContractAmt field
Because Taylor won’t need to run this query again, you won’t save it.
5. Close the query without saving it.
6. If you are not continuing on to the next session, close the Panorama database, and
then exit Access, clicking the Yes button if you are prompted to confirm that you
want to exit Access and to empty the Clipboard.