Access 2016 Intermediate

Lesson 4 – Designing Advanced Queries

Access 2016

S ETTING T OP V ALUES IN A Q UERY

Discussion

Limit the results of a query so that only the highest or lowest values in a field appear in the recordset. For example, set the return of a Quantity Sold field to 10 to find the top ten best-selling products.

You can also limit the number of records to a specific number or percentage of all records queried (e.g., the top 25%). The field for which you are setting the top or bottom values must be sorted. If the field is sorted in descending order (Z to A, 9 to 0), the top values will be found. If the field is sorted in ascending order (A to Z, 0 to 9), the bottom values will be found.

Setting top values in a query

NOTE If other fields in the query are sorted, they must appear to the right of the field for which you are finding top or bottom values in the design grid. You can also type a value into the Return box on the Design tab.

Procedures

1. Open the desired query in Design view. 2. Select the Sort row for the desired field.

Page 70

OFFICEPRO, Inc.

Made with FlippingBook - professional solution for displaying marketing and sales documents online