Modules >>
Access I >>
Sorting and filtering records (Access XP)

Sorting records

The datasheet view of the table you created will always appear sorted in ascending order of the data in the primary key field. In a previous lesson, you set the field for the last name as the primary key field.  If you want to view the table or form sorted by a different field, click on any cell in the desired field then click either the ascending or descending sort button in the toolbar, which look like the following:

ascendbt.jpg (935 bytes) descend.jpg (1029 bytes)

Filtering records

A filter allows you to apply a set of selection criteria and/or sorting instructions to the records in a table. The act of the filter is temporary, so the next time you view your data, you will have to repeat the filter process to view selected records a second time.

In either the table or form view, you may apply a filter to the records.  To do this,

dbfilter.jpg (9133 bytes)

You may also access the filter options by right-clicking on the field you wish to search.  You can select "Filter For" and type in the text you wish to search, then press Enter. You will then be shown the records that contain that value in the field you selected.  Remember to select "Remove Filter/Sort" to return to viewing all records in your database.

The Advanced Filter/Sort option will allow you to combine fields and identify more complex search criteria.  There is no filter or sort assignment for this module. For more information on Filters and Sort, go to the Help menu and search for these topics.

Please continue to the next section on Creating a Query.

arrow_orange_stubby_up.gif (875 bytes)

Copyright © 2001-2002 Valerie Irvine. All rights reserved.
Revised: October 29, 2002.