Part I: Access Building Blocks
244
l (^) Contains “Trucks”
l Does Not Contain “Trucks”
The area to the right of the Navigation buttons — at the bottom of the Datasheet window — tells
you whether the datasheet is currently filtered; in addition, the Toggle Filter command on the rib-
bon is highlighted, indicating that a filter is in use. When you click this command, it removes the
filter. The filter specification does not go away; it’s simply turned off. Click the Toggle Filter com-
mand again to apply the same filter.
Filtering by selection is additive. You can continue to select values, each time pressing the
Selection command.
Tip
Right-click the field content that you want to filter by and then select from the available menu choices.
If you want to further specify a selection and then see everything that doesn’t match that selection
(for example, where the Make field is not Chevrolet), move the cursor to the field (the Make field
where the value is Chevrolet), right-click on the datasheet, and then select Does Not Equal
“Chevrolet” from the filter options that appear in the right-click shortcut menu.
When using the Selection command on numeric or date fields, select Between from the available
command to enter a range of values. Enter the smallest and largest numbers or oldest and newest
dates to limit the records to values that fall in the desired range.
Imagine using this technique to review sales by salespeople for specific time periods or products.
Filtering by selection provides incredible opportunities to drill down into successive layers of data.
Even when you click the Toggle Filter command to redisplay all the records, Access still stores the
query specification in memory. Figure 6.19 shows the filtered datasheet, with the Filter by Select
list still open on the Category field.
When a datasheet is filtered, each column has an indicator in the column heading letting you
know if a filter is applied to that column. Hover the mouse over the indicator to see a tooltip dis-
playing the filter. Click on the indicator to specify additional criteria for the column using the pop-
up menu shown in Figure 6.20. Click on the column heading’s down-arrow for an unfiltered
column to display a similar menu.
The menu contains commands to sort the column ascending or descending, clear the filter from
the field, select a specific filter, and check values you want to see in the datasheet. The available
commands change based on the data type of the column. In this case, Text Filter lets you enter a
criterion that filters the data based on data you type in.