Sorting records means arranging data in a particular order. In Microsoft Access, you can sort records alphabetically, numerically, or by date. Sorting makes it easier to find and understand information stored in a table or query.
Sorting is the process of arranging records according to the values in one or more fields.
For example, a Students table may contain these records:
| StudentID | StudentName | Course | Fees |
|---|---|---|---|
| 103 | Rahul | ADCA | 10000 |
| 101 | Amit | Tally Prime | 4000 |
| 102 | Priya | Web Development | 12000 |
If you sort the StudentName field in ascending order, the records will appear as Amit, Priya, and Rahul.
Ascending order arranges values from smallest to largest or alphabetically from A to Z.
Descending order arranges values from largest to smallest or alphabetically from Z to A.
| Sorting Type | Meaning | Example |
|---|---|---|
| Ascending | Smallest to largest / A to Z | 100, 200, 300 |
| Descending | Largest to smallest / Z to A | 300, 200, 100 |
Follow these steps to sort records in a table:
If you sort a numeric field such as Fees in ascending order, the lowest fee appears first.
| StudentName | Fees |
|---|---|
| Amit | 4000 |
| Rahul | 10000 |
| Priya | 12000 |
Sorting a Date/Time field in ascending order displays earlier dates first. Descending order displays later dates first.
Make sure the field uses the appropriate Number, Currency, or Date/Time data type so Access sorts the values correctly.
Sometimes, sorting by one field is not enough. You may want to sort students first by Course and then by StudentName.
Suppose you want students grouped by course and names arranged alphabetically within each course.
You can remove the current sort when you want to return to the table's normal record order.
Clearing a sort removes the active sorting arrangement. It does not delete the records or change their field values.
Create a Students table containing these fields:
Goal: Practice sorting text, numeric, and date values.
1. What does ascending order mean for names?
2. Which command sorts numeric fees from highest to lowest?
3. What happens when you clear a sort?