Lesson 12: Sorting Multiple Records
By the end of this lesson, you should be able to:
- Perform a multi-field sort
- Remove a sort
Multi-field sorting sorts the record on the first field you specify, then sorts records with the same value using another specified field. For example, you can alphabetize all of the Browns by first name.
To sort by multiple fields:
- Open the desired form or table in Datasheet view.
- Move the columns you want to sort so they are next to each other.
Moving a column in Access is similar to moving a column in Excel.
- Select the column by clicking the column heading. The mouse pointer becomes a white arrow with a ghost box.
- Drag the column to the desired position. As you drag, a dark vertical line is shown moving between the columns. Release the left mouse button.
- The column sorted first should be on the left, the second to its immediate right, and so on.
- Select all fields (columns) involved in the multi-sort process.
- Click the ascending or descending button on the toolbar.
Multiple sorting example
Multi-field sorting example
You can't perform multi-field sorts in Columnar or Tabular Form view.
To remove the sort order:
- Choose RecordsRemove Filter/Sort from the menu bar.
- If you add new records to a table that has been sorted, any new records are automatically saved.
- Open the Great Lake Elementary School database.
- In the database window, choose the Table tab from the Objects palette.
- Double-click the Student table to open it.
- Choose ViewDatasheet View from the menu bar.
- Practice performing a multi-field sort by sorting alphabetically by Student Last Name and then by Student ID.
- Close the database. When prompted to save changes, choose Yes.