Microsoft Office Tutorials and References
In Depth Information
Filtering to Find Information
The difference between a filter and a query
The biggest difference between filtering and
querying is that you can save a query and call
upon it more than once. Queries are kept at
the ready in the Navigation pane. A filter, on
the other hand, is as good as the first time you
use it, although you can save and run it as a
query. Filters apply to a single database table,
whereas you can query to assemble
information from more than one table. In the results
of a query, you can include as many fields as
you want, but the results of a filtering
operation show all the fields in the database table,
regardless of whether you want them.
When it comes to examining data, a query is
more sophisticated than a filter. Although you
can use standard comparison operators to
find records by filtering, querying gives you
the opportunity to use complex expressions as
well as comparison operators. You can filter,
for example, to find people whose income is
greater than or less than a certain amount.
However, because you can write expressions
in queries, you can query to find people whose
income falls within a certain range.
The basic idea behind filtering is to choose a field value in the database
table and use it as the standard for finding or excluding records. For
example, you can find all the orders for a particular customer, all orders taken
in the month of April, or all the orders that a particular customer placed in
April. For that matter, you can filter by exclusion and see the records of all
the orders in a database table not taken in April and not for a particular
customer. Filtering is useful when you need to find records with specific
information in a single database table.
Different ways to filter a database table
For comparison purposes, here are shorthand descriptions of the four ways
to filter a database table. All filtering operations begin in Datasheet view
on the Home tab. These techniques are described in detail in the upcoming
✦ Filter by Selection: Select all or part of a field in the database table, click
the Selection button, and choose a filtering option. Access isolates all
records with the data you select. This method works best when you
can’t quite decide what you’re looking for. It’s the only filtering method
that permits you to look for data found in a whole field or part of a field.
You can also filter data that doesn’t match the selection.
✦ Filter for Input: Select the field you want to filter with and click the
Filter button. A dialog box appears so you can choose values in the field
or enter comparison operators to describe the numeric or date values
you are filtering for. With this technique, you can filter for data ranges.