[ Team LiB ] Previous Section Next Section

Filtering the Data Underlying a Form

From the Form view, you can apply a filter to view a select group of records. You do this when you want to focus on a select group of records. For example, you might just want to work with the records in the Customers table for which the contact title is owner. You can use the Filter by Form feature to accomplish this task. When you learn how to use the Filter by Form feature, you need to know how to remove filters and how to work with multiple filter criteria.

Using the Filter by Form Feature

The Filter by Form feature is a wonderful feature that is built into Access 2003. It allows you to easily implement filtering while viewing data within a form. Here's how you use it:

  1. Open the form whose data you want to filter.

  2. Choose Records | Filter | Filter by Form. The Filter by Form feature appears.

  3. Click in the field whose data you want to use as the filter criteria.

  4. Select the field data to filter on from the drop-down list (see Figure 4.14).

    Figure 4.14. The Filter by Form feature.

    graphics/04fig14.jpg

  5. Choose Filter | Apply Filter/Sort or click the Apply Filter tool on the toolbar. Access filters the data to just the designated rows.

Removing a Filter

To remove a filter, you simply choose Records | Remove Filter/Sort or click the Remove Filter toolbar button. Access then displays all the records in the record source underlying the form.

Using Multiple Filter Criteria

So far in this hour you have learned how to apply a single filter criterion for a single field. The following steps describe how to apply multiple filter criteria for multiple fields or multiple filter criteria for a single field. The process is similar to that of applying a single filter criterion for a single field:

  1. Open the form whose data you want to filter.

  2. Choose Records | Filter | Filter by Form. The Filter by Form feature appears.

  3. Click in the first field you want to filter by.

  4. Select the field data to filter on from the drop-down list that automatically appears when you click the Filter by Form tool and then click in a text box.

  5. Select the Or tab.

  6. Click in the next field you want to filter by. A drop-down list appears for that field.

  7. Select the field data to filter on from the drop-down list.

  8. Repeat steps 5 through 7 to apply as many additional filter options as desired.

  9. Choose Filter | Apply Filter/Sort after you have applied all the desired filters. Access applies the designated filter.

graphics/bulb_icon.gif

You can filter by right-clicking a field and selecting Filter by Selection.


graphics/book_icon.gif

When creating multiple filters by using the Or tab, the records that meet either condition appear in the output.


    [ Team LiB ] Previous Section Next Section