# Lesson3.2.Sorting Records

### Lesson 3.2. Sorting Records

##### 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.

1. 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.

2. Click anywhere in the Last Name field.

Here's how to sort a table:

3. 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.

4. 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.

5. 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

Order

Alphabetic

Numeric

Date

Ascending

A, B, C

1, 2, 3

1/1/99, 1/15/99, 2/1/99

Descending

C, B, A

3, 2, 1

2/1/99, 1/15/99, 1/1/99

## QUICK REFERENCE

TO SORT RECORDS BY ONE FIELD:

1. CLICK ANYWHERE IN THE COLUMN YOU WANT TO USE TO SORT THE LIST.

2. CLICK EITHER THE SORT ASCENDING BUTTON OR SORT DESCENDING BUTTON ON THE TOOLBAR.

Access 2003 Personal Trainer (Personal Trainer (OReilly))
ISBN: 0596009372
EAN: 2147483647
Year: 2005
Pages: 209