Lesson 3.2. Sorting Records
Figure 3-3. A table is normally displayed in the order its records were entered.
Figure 3-4. The table sorted by the Last Name field.
When you enter new records in a table, they are added at the end of the table in the order you enter them (see Figure 3-3). Working with information in such a jumbled order can be difficult if not impossible. Fortunately you can sort, or change the order of records in a table. You can sort records alphabetically, numerically, or chronologically (by date). Additionally, you can sort information in ascending (A to Z) or descending (Z to A) order. This lesson will show you several techniques you can use to sort information in your tables, queries, pages, and forms.
Note: If you frequently sort a table the same way, you should consider creating and using a query that automatically sorts the table data for you. A query that sorts a table alphabetically by name would be a good example of such a query.
If it isn't already open, find and open the Employees table.
First you need to put the cursor in the field you want to use to sort the table. You want to sort the list by the last name, so you would select the LastName field.
Click anywhere in the Last Name field.
Here's how to sort a table:
Click the Sort Ascending button on the toolbar.
Access sorts the table, ordering the records in ascending (A-Z) order by last name, as shown in Figure 3-2. You can also sort a list in descending (Z-A) order.
Click the Sort Descending button on the toolbar.
The list is sorted in descending (Z-A) order by the Last Name field.
Let's try the table using a different field.
Click anywhere in the Birth Date field and click the Sort Ascending button on the toolbar.
Access sorts the table by the Birth Date field and we instantly discover that poor Margaret Peacock is the oldest employee in the company.
Table 3.2 shows examples of methods of .
Table 3-2. Sort Examples
A, B, C
1, 2, 3
1/1/99, 1/15/99, 2/1/99
C, B, A
3, 2, 1
2/1/99, 1/15/99, 1/1/99
TO SORT RECORDS BY ONE FIELD:
CLICK ANYWHERE IN THE COLUMN YOU WANT TO USE TO SORT THE LIST.
CLICK EITHER THE SORT ASCENDING BUTTON OR SORT DESCENDING BUTTON ON THE TOOLBAR.