Access 2000: Sorting Records

Lesson 11: Sorting Records

/en/access2000/deleting-form-records/content/

Introduction

By the end of this lesson, you should be able to:

  • Review table records and form records concepts
  • Perform a simple sort
  • Save a sort

Table and form concepts

In previous lessons, you learned to open an existing table and add, edit, and delete table records. You also learned to open an existing form and add, edit, and delete form records.

Tables are the building blocks of any database. Forms are simply a way of customizing the display of data in a table, making it easy to enter and view data.

Different methods of accessing data require that you work in different views. When working with tables, you work in Datasheet view. When working with forms, you work in Form view.

Important pointIn this lesson, you will learn to sort and find records.

Using a database, finding information is quick and easy. Depending on what you want to know, Access offers several search methods ranging from the simple to the complex.

Sorting records to find information

One method of finding information, sorting, allows you to access information quickly and easily.

Records can be sorted in ascending order (A-Z) and descending order (Z-A). You can sort by zip code, last name, first name, grade, teacher, etc. You can even sort by grade and then by last name within each grade.

Important pointIt's easiest to see the results of a sort if you work in Datasheet view.

Working in Datasheet view

When working with tables, you work in Datasheet view. In Datasheet view, you can add, edit, and view data in a table. You can also check spelling, print the table data, filter and sort records, change how the datasheet is displayed, and change the table structure by adding and deleting columns.

Because it's easiest to see the results of a sort in Datasheet view, let's convert a form (Form view) to Datasheet view.

To choose Datasheet view:

  • Open the desired form or table you want to work with.
  • Choose Viewlesson actionDatasheet View from the menu bar.
  • The form records are now displayed in Datasheet view.

Sorting records

When sorting a table, you have made a change to the table design. When you attempt to close the table, Access asks if you want to save the changes to the table design. If you choose to save the changes, click Yes. The sort order is saved. When you open the table again, the records will still be sorted. If you choose No, the change is not made and the table remains in its original design.

Office Assistant's message: Do you want to save changes to the design of the table?

To sort records:

  • Whether you're working in a table or form, switch to Datasheet view.
  • Click anywhere in the column you want to sort by.
  • Click the ascending or descending sort button.

Ascending and Descending Sort buttons

Great Lake Elementary's Teacher table seen in Datasheet View. Currently, the table is sorted by Teacher ID

To sort by Teacher First Name, select the column (or click anywhere in the column

The Teacher First Name column is now sorted alphabetically after pressing the Ascending order button

Important pointTo sort by Form view, switch to Form view, select the field you want to sort by, and click the Sort button on the toolbar. To see the results, use the status area to move through the records.

Challenge!

  • 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 Viewlesson actionDatasheet View from the menu bar.
  • Practice performing a simple sort by sorting students alphabetically by Student Last Name.
  • Close the database. When prompted to save changes, choose No.

/en/access2000/sorting-multiple-records/content/