Sorting Data

Even th ough you enter your records into the database in some sort of logical order, at some point, you'll want them in a different order. For instance, if we entered the dogs in our kennel according to registration number, we might later want to look at the list according to the dogs' birthdates, from oldest to youngest.

The Sort command is the perfect solution to this problem. With Sort, you can rearrange the records according to any field you like. You can sort in either ascending (A to Z, 1 to 10) or descending (Z to A, 10 to 1) order.

Which View?

You can sort in either Form or Datasheet view, but I prefer Datasheet view because it shows many records at once.


Follow these steps to sort records:

  1. Click anywhere in the field on which you want to sort.

  2. Click the Sort Ascending button or Sort Descending button on the toolbar. Or if you prefer, select Records, Sort, and then choose Ascending or Descending from the submenu. Figure 18.1 shows our table of dogs sorted in Ascending order by birthdate.

    Figure 18.1. Access sorted this table in Ascending order by the Birthdate column.

  3. If you want to restore the records to their presorted order, select Records, Remove Filter/Sort.

What Is Presorted Order?

If you defined a Primary Key field when you created your database (see Lesson 7), the records appear sorted in ascending order according to that field by default. This is the order they revert to when you remove a sort (as in step 3). If you save the datasheet or form without removing the sort, the sort order becomes part of that object.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.68.14