Sorting and Filtering Records

When working in Access sort data to make it easier to work with. In Access filter data as well so you see only what you want to see.

Creating a filter from a search term

You can also create a filter by entering a search term and specifying the way Access should match data to that term. Creating a filter from a search term is similar to creating a filter from a selection.

Filtering text by a search term

When filtering text by entering a search term, you can use some of the same options you use when filtering by a selection, like Contains, Does Not Contain, Ends With, and Does Not End With. You can also choose from the following options:

To filter text by a search term:

  1. Click the drop-down arrow next to the field you want to filter by. We want to filter the records in our orders table to display only those that contain notes with certain information, so we'll click the arrow in the Notes field.
    Selecting a field to filter bySelecting a field to filter by
  2. In the drop-down menu, hover your mouse over the words Text Filters. From the list that appears, select the way you want the filter to match the term you enter. In this example, we want to view only records whose notes indicate the order was placed for a party. We'll select Contains so we can search for records that contain the word party.
    Selecting filter settingsSelecting filter settings
  3. The Custom Filter dialog box will appear. Type the word you want to use in your filter.
    Typing the term the filter will search forTyping the term the filter will search for
  4. Click OK. The filter will be applied.
    The filtered table, now showing only records containing the word "party" in the Notes fieldThe filtered table, now showing only records containing the word "party" in the Notes field

Filtering numbers with a search term

The process for filtering numbers with a search term is similar to the process for filtering text. However, different filtering options are available to you when working with numbers. In addition to Equals and Does not Equal, you can choose:

To filter numbers by a search term:

  1. Click the drop-down arrow next to the field you want to filter by. We want to filter the records in our menu items table by price, so we'll click the arrow in the Price field.
    Selecting a field to filter bySelecting a field to filter by
  2. In the drop-down menu, hover your mouse over the words Number Filters. From the list that appears, select the way you want the filter to match your search term. In this example, we want to create a filter that will show us inexpensive items only. We want to see items that are under a certain price, so we'll select Less Than.
    Selecting filter settingsSelecting filter settings
  3. The Custom Filter dialog box will appear. Type the number or numbers you want to use in your filter. We'll type 5 so the filter will show us only menu items that cost $5 or less.
    Typing the number to filter forTyping the number to filter for
  4. Click OK. The filter will be applied.
    The filtered table, now showing only records for menu items costing $5 or lessThe filtered table, now showing only records for menu items costing $5 or less

Specific types of numbers may include other filtering options. For instance, dates stored in numerical form (mm/dd/yy—e.g., 12/01/2010) include options to filter by periods of time.

Filtering by dateFiltering by date