Although sorting rearranges the records in the table, you might need to see a subset of the records in a table based on a particular criterion. Filtering is used for this purpose. The Filter feature temporarily hides records from the table that do not meet the filter criteria.
For example, you might want to view only the records in an employee table for the employees who have exceeded their sales goal for the year. Or in an order table, you might want to find orders that were placed on a particular date. Filters can help you temporarily narrow down the records shown in the table based on your criteria.
You can apply a filter in three ways: Filter by Selection (or Filter Excluding Selection), Filter by Form, and Advanced Filter/ Sort . The first two methods are very easy ways to quickly filter the records in a table.
The Advanced Filter/Sort feature uses a Design view that is almost the same as the Query Design view (covered in Lesson 2). If you learn how to create queries (which are really nothing more than advanced filters/sorts), you will be able to work with the Advanced Filter/Sort feature.
This section covers Filter by Selection and Filter by Form. Next, take a look at how you filter by selection.
Filter by Selection
Filtering by selection is the easiest method of filtering, but before you can use it, you must locate a field that contains the value that you want to use to filter the table.
To filter by selection, follow these steps:
With Filter by Selection, you can filter by only one criterion at a time. However, you can apply successive filters after the first one to further narrow the list of matching records.
You can also filter for records that don't contain the selected value. Follow the same steps as outlined in this section, but choose Records, point at Filter, and choose Filter Excluding Selection in step 3.
After you have finished viewing the records that match your filter criteria, you will want to bring all the table records back on screen. Select Records, Remove Filter/Sort.
Filter by Form
Filtering by form is a more powerful filtering method than filtering by selection. With Filter by Form, you can filter by more than one criterion at a time. To filter by form, follow these steps:
As in Filter by Selection, you can remove a filter by clicking the Remove Filter button (same icon as for Apply Filter) or by selecting Records, Remove Filter/Sort.
Saving Your Filter As a Query
If you design a filter that you would like to keep, it resides on the Query list in the database window. You will work with queries in Lessons 15 and 16.
To save a filter as a query, follow these steps: