MS Access

Sorting Records

When you enter new records in a table, they are added at the end of the table in the order you enter them. 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.

A table is normally displayed in the order its records were entered.

The table sorted by the Last Name field.

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. 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 shows examples of methods of .

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

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.

by BrainBellupdated
Advertisement: