Access 2010
Sorting and Filtering Records
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:
- Equals, which includes only records with data that is identical to the selected data
- Does Not Equal, which includes all records except the data that is identical to the selection
- Begins With, which includes only records whose data for the selected field begins with the search term
- Does Not Begin With, which includes all records except those whose data for the selected field begins with the search term
To filter text by a search term:
- Click the drop-down arrow next to the field you would like 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 by
- In the drop-down menu, hover your mouse over the words Text Filters. From the list that appears, select the way you would like 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 settings
- The Custom Filter dialog box will appear. Type in the word you would like to use in your filter.
Typing the term the filter will search for
- Click OK. The filter will be applied.
The 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 the Equals and Does not Equal, you can choose:
- Greater Than to include only records with numbers in that field greater than or equal to the number you enter
- Less Than to include only records with numbers in that field less than or equal to the number you enter
- Between to include records with numbers that fall within a certain range
To filter numbers by a search term:
- Click the drop-down arrow next to the field you would like 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 by
- In the drop-down menu, hover your mouse over the words Number Filters. From the list that appears, select the way you would like 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 settings
- The Custom Filter dialog box will appear. Type in the number or numbers you would like 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 for
- Click OK. The filter will be applied.
The 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.