Microsoft Access Training

Working with Filters

Learn to display selected Access records with filters by selection, exclusion, multiple criteria, Filter by Form, date comparisons, and text containing searches.

Start here

Overview

This lesson filters client records in tables and forms without changing or deleting the underlying data.

What You Will Learn

  • Apply a filter by selecting an existing value.
  • Remove and reapply a filter with Toggle Filter.
  • Exclude records matching a selected value.
  • Apply more than one filter criterion.
  • Use Filter by Form.
  • Apply date comparison criteria.
  • Use filters in forms.
  • Use Contains to filter by part of a text value.

Before You Begin

  • Entering and reviewing records
  • Tables and forms
  • Basic comparison operators

Why This Matters

Filters provide a quick, temporary way to focus on selected records while preserving the complete table and avoiding the need to create a saved query for every simple question.

Plan Your Study

  • Filter TblClients for Boise records.
  • Turn the filter off and create an exclusion filter.
  • Combine City and ZIP criteria.
  • Use Filter by Form with City and DOB.
  • Close and reopen the database to examine saved filter behavior.
  • Apply filters in FrmClients.
  • Use Contains on part of an address.

Next step

Read the complete chapter.

The Learn tab contains the written lesson from Surviving Statistics.

Go to Learn

Written lesson

Learn Working with Filters

Learn to display selected Access records with filters by selection, exclusion, multiple criteria, Filter by Form, date comparisons, and text containing searches.

Advertisement

Working with Filters

Much of the power in an Access database comes when you intitally set it up. One of the essential elements of proper database design is understanding how to use Access' Filters. This lesson will step you through working with filters.

Working with Filters

Filters provide a quick and easy way to view certain records in a table or form. A filter can select specific records based on conditions or criteria, similar to a query, but filters are easily applied to tables and forms. While queries can become the basis of reports, mailing label and even forms, filters are more of a temporary way to view specific records. With a simple mouse click to turn a filter on or off, you can switch between looking at a subset and the entire record set.

When you apply a filter, the word Filtered appears in the navigation bar (after the number of records) to indicate that you are looking at a filtered subset of records. Filters are very useful for doing simple record counts.

1. Open the No Fault Travel database if it is not already open.

2. Open TblClients in Datasheet View.

You can apply a filter by using the toolbar or right-clicking. In the next steps, you will use the right-click method.

3. Right-click any cell where Boise occurs in the City field.

Filter by selection

You will now see a shortcut menu with several filter options. The Equals “Boise” option will instantly create a filter based on the text you have selected, Boise in this case.

Microsoft Access lesson screenshot 3rdLesson1

4. In the shortcut menu, choose Equals “Boise”.

You should now only see the records with Boise in the city field. The navigation bar displays the number of records that meet this criterion and the word Filtered to indicate that a filter has been applied to the list of records you are viewing. When you are using Access on your own, you will want to watch for the Filtered indicator when you open a table or form and it appears some of your records are missing.

Microsoft Access lesson screenshot 3rdLesson2

Removing a filter

After applying a filter you will eventually want to return to the unfiltered record set. The Toggle Filter tool on the ribbon will cause Access to toggle between the unfiltered and filtered record sets.

1. Locate and click the Toggle Filter tool on the ribbon to turn the filter off.

Microsoft Access lesson screenshot 3rdLesson3

You should now see all the records in the table. The navigation bar should also display Unfiltered.

Filter Excluding Selection

In the previous steps, you used the Equals option to show all the records which have that value in the field. Access also allows you to filter all records which do not match the value you have selected with the Does Not Equal option.

1. Right-click on Boise in any cell in the City field.

2. From the shortcut menu, select Does Not Equal “Boise.”

Microsoft Access lesson screenshot 3rdLesson4

You should now see all the records which do not have Boise in the City field.

3. Click the Toggle Filter tool to turn off the filter.

You can also easily turn off a filter by clicking on the Filtered indicator on the navigation bar.

Using multiple criteria in filters

Similar to queries, you can impose filter criteria on more than one field. You can add a filter(s) to filtered record sets or use a feature called Filter By Form. We will explore both options.

1. In the Datasheet View, right-click Boise in the City field and use the Equals option to view only the records with Boise.

The records for Boise should be listed as they were earlier. Now you will apply a second filter to the filtered set of records. In other words, you will apply a second condition, but to only those records with Boise in the City field.

2. Viewing the filtered records in the table, right-click 83705 in the Zip field and choose the Equals 83705 filter option.

Microsoft Access lesson screenshot 3rdLesson5

Only the records with Boise in the City field and the zip code 83705 in the Zip field are displayed. This example shows that you can use multiple filters to further narrow the record set.

3. Turn off both filters by clicking the Filtered indicator on the navigation bar.

We will now use the Filter By Form option to set filter criteria with more than one field..

4. Click the Advanced tool in the Sort & Filter group and select Filter By Form.

Microsoft Access lesson screenshot 3rdLesson6
Microsoft Access lesson screenshot 3rdLesson7

The Filter by Form window appears with the last applied criteria. You can modify and delete criteria using this form. You can apply filters to multiple fields.

5. In the Filter by Form window, delete the criteria in both the City and Zip fields.

To delete existing criteria you can highlight the criteria and then press the (Delete) key.

Microsoft Access lesson screenshot 3rdLesson8

6. In the Filter by Form window, click the dropdown arrow in the City field and choose Boise.

Using the Filter by Form option makes it easy to specify criteria in multiple fields. It also allows you to use comparison operators such as > or < in filters. You will now use a comparison operator to add a criterion to the date of birth field.

You may also notice that Access added hashtags (#) to the date and quotation marks (“) to the city. These symbols indicate that Access recognizes the date as numeric and the city as text.

Microsoft Access lesson screenshot 3rdLesson9

7. Click in the DOB field and type >12/31/1964. Click the Toggle Filter tool.

You should see a list of the clients who live in Boise and were born after 1964.

8. Click the Toggle Filter tool to view all records.

Access remembers the last filter you applied. You saw this when you first opened the Filter by Form. The criteria for Boise and the zip code of 83705 where already stored in the form. If you close a table, or even the database, the last filter you applied will still be stored and available for use. You will now see this demonstrated in the next few steps.

9. Close the TblClients table and the No Fault Travel database.

Access did not ask you about saving changes to the table, unless you made some design changes on your own. Even though it did not ask, Access did save the last filter you applied.

10. Open the No Fault Travel database again and display TblClients in datasheet view.

You should be viewing all the records in the table.

11. Click the Toggle Filter tool.

Microsoft Access lesson screenshot 3rdLesson10

You should be viewing only those records in Boise with a date of birth after 12/31/1964.

12. Click the Toggle Filter tool again and close TblClients.

Once again, you are viewing all the records in this table.

Using filters in forms

You can also use the filter by selection option when viewing records in a form. This is different than the Filter by Form option we just explored. In the next steps, you will apply a filter in a form. You will also add some additional records.

1. Open the clients form, FrmClients.

Microsoft Access lesson screenshot 3rdLesson11

2. In the first record, right-click Boise in the City field and choose Equals Boise in the shortcut menu.

3. Scroll through the records.

Notice that only the records for clients in Boise are displayed. Look at the navigation bar. The filtered indicator appears and only four records are included. You are viewing records with a filter applied.

4. Turn off the filter. Then, enter the following two additional records using the form.

Microsoft Access lesson screenshot 3rdLesson12

We applied filtering in forms to illustrate that Access filter options are available in both tables and forms. You will now view No Fault Travel’s clients in the table format.

5. Close FrmClients and open the clients table, TblClients.

Using “containing” in filters

In the previous exercises, the filters set criteria for the entire value in a field. However, it is also possible to set criteria for just a portion of the field. For example, you may want to find the records of clients who live on an avenue. In this case you would filter the Address field with a filter Containing “Ave.” These filters are not case sensitive.

Microsoft Access lesson screenshot 3rdLesson13

1. Carefully select only land in the Address field for Janice Johnson.

Instead of accessing filter options by right-clicking to open the shortcut menu as we did earlier, we will use filter tools on the ribbon in the next steps. Either method can be used.

Microsoft Access lesson screenshot 3rdLesson14

2. Then click the Selection tool in the Sort & Filter group and choose the Contains “land” option.

Notice the Ends With “land” and Does Not End With “land” options alsoavailable for filtering. If you had instead selected 875 in this cell, filter options would have included Begins With 875 and Does Not Begin With 875. .

Once the Contains “land” filter option is applied, only the records whose Address field contains “land” will be listed.

Microsoft Access lesson screenshot 3rdLesson15

3. Toggle the filter to turn it off. Close the clients table.

The last filter you applied, Contains “land”, is now stored as part of the table information. The next time you open the clients table, this is the filter that will be applied when you click the Toggle Filter tool.

4. Close the database.

Advertisement

Next step

See the concepts demonstrated.

Continue to Watch for chapter videos and worked examples.

Go to Watch

See it explained

Watch

Choose the explanation or example that best supports your learning.

Instructional videos will be added later.

Next step

Apply what you have learned.

Use the guided questions and activities in Practice.

Go to Practice

Apply what you learned

Practice Working with Filters

Use TblClients and FrmClients to apply, remove, combine, and review several kinds of filters.

Guided Practice

  • Filter the client table to show only Boise records.
  • Turn the filter off with Toggle Filter.
  • Exclude Boise records.
  • Filter Boise records further to ZIP code 83705.
  • Use Filter by Form for Boise clients born after December 31, 1964.
  • Filter the client form for Boise records.
  • Use Contains to find addresses containing the text land.

Challenge Yourself

  • Create a filter using a different city and date criterion.
  • Compare filtering in a table with filtering in a form.
  • Explain what happens when multiple filters are applied one after another.
  • Create a saved query that returns the same records as one of the temporary filters.

Check Your Understanding

  • Can you explain the difference between removing a filter and deleting records?
  • Can you distinguish Equals, Does Not Equal, and Contains?
  • Can you explain how two sequential filters narrow the result?
  • Can you identify when a saved query would be preferable to a temporary filter?

Next step

Save the materials you may need later.

Open Resources for the study sheet, spreadsheets, and related learning materials.

Go to Resources

Keep learning

Resources

Study sheets, downloadable files, companion tools, and related lessons for this chapter.

For educators

Teaching this chapter?

The Instructor tab contains objectives, teaching ideas, assessments, and a printable guide.

Open Instructor Resources

LutherMaddy.com — Helping Humans Learn

Working with Filters: Instructor Resources

Teach this lesson

Instructor Resources

Classroom-ready objectives, teaching ideas, questions, and assessment materials for this chapter.

Learning Objectives

  • Apply and remove filters by selection.
  • Exclude a selected value.
  • Combine multiple filter criteria.
  • Use Filter by Form and comparison criteria.
  • Apply filters in forms.
  • Use Contains for partial-text matching.

Prerequisite Knowledge

  • Tables and forms
  • Record navigation
  • Basic comparison criteria

Teaching Outline

  • Apply a filter by selection.
  • Toggle the filter off and on.
  • Exclude the selected value.
  • Combine City and ZIP filters.
  • Use Filter by Form with a date.
  • Filter a form.
  • Use Contains with partial text.

Key Concepts

  • Filters temporarily limit displayed records.
  • Toggle Filter removes or reapplies the current filter.
  • Sequential filters narrow the visible record set.
  • Filter by Form supports criteria in several fields.
  • Contains matches text appearing anywhere within a field.

Classroom Demonstration

  • Show that filtered-out records still exist.
  • Apply one criterion and then a second to show progressive narrowing.
  • Compare Equals with Contains.

Questions to Ask

  • When is a filter faster than creating a query?
  • When should a repeated filter be saved as a query?
  • How can filtering in a form improve user experience?

Teaching Notes

  • Repeat that filters do not delete records.
  • Show the Filtered indicator on the navigation bar.
  • Have students record the visible record count after each filter.

Assessment Ideas

  • Apply selection and exclusion filters.
  • Create a multiple-criteria Filter by Form.
  • Filter records in a form.
  • Use a partial-text filter.

Grading Rubric

CriterionPoints
Selection filter correct2
Exclusion filter correct2
Multiple criteria applied correctly2
Form filter correct2
Contains filter and explanation correct2
Total10

Exam and Discussion Questions

Basic

  • Explain what Toggle Filter does.

Applied

  • Filter a client list for one city and a specified date range.

Conceptual

  • Compare a temporary filter with a saved select query.

Keep Exploring

Continue Learning

Explore step-by-step lessons, interactive calculators, downloadable study sheets, and practical educational resources.