Office 2007 - Access

Lesson 24: Sorting Queries

24/72 Lessons 

“Sort”

One way to sort the fields in a “Query” is by clicking the downward pointing arrow button, next to the column title.
This opens a drop-down menu where you have the choice of sorting “Descending” or “Ascending” data.


A second way to sort data in a “Query” is in “Design view.”
The third row in the grid is the “Sort” order row.
When you click in a cell on this row, a drop-down menu with the options “Ascending”, “Descending” and “not sorted” are shown.
In this example, I choose the “Last Name” field to sort “Ascending” and the “Score”on “Descending”.

When you sort on multiple columns in “Design view”, it sorts from left to right.
This means that “Access” will sort first on the “Last Name” and within these records, “Access” will sort the “score” descending.
Click the “Run” button in the “Ribbon” to see the result.

If you want to save the “Query”, click the “Save” button in the “Ribbon” and give it an appropriate name.

Show Highest values

In “Access”, we have the option to display the highest values from the “Query”.
In the “Ribbon”, under the “Design” contextual tab, we have a drop-down menu.
Click on the drop-down arrow next to the “Return” box.
Select an option from the drop-down menu, or type your own value in the textbox (1).

Then choose the sorting order of the fields.
Choose “Descending” (2) or “Ascending” in the drop-down menu.
“Descending” gives you the highest values and “Ascending” gives you the lowest values.

Since I want to see the top 3 of the highest scores, I choose “Descending”.
To see the result, I click the “Run” button in the “Ribbon”.

Awesome!
You've completed Lesson 24
START NEXT LESSON