Q. How do I perform text queries (called filters) in Works?
A. In a very large database, it may be useful to perform a filter
that has Works show on screen only records that match criteria
you specify. For example, you can have Works show only records that
have a value in a State field of WA, or only records for customers
whose first name is Betty.
To create a filter in the Works for Windows 95 database, follow the
steps below.
NOTE: This example shows the steps to use if you want to find
all of the people named "Betty" in an open database that contains
a field called "First Name".
On the Tools menu, click Filters. You might need to
name the filter before proceeding to step 2.
In the Field name box, select the First Name
field.
In the Comparison box, select the appropriate operator, for
example, "Is Equal To" or "Contains".
In the Compare To box, type search target information. For
example, Betty.
Click Apply Filter.
Q. How do I filter on a blank field?
A. To perform a filter on a blank field, follow the steps below:
Follow steps 1-2 in Question 1 of this article.
In the Comparison box, select the operator Is
Blank.
Click Apply Filter.
Q. How do I filter on a range of dates?
A. You can filter on a range of dates by using the AND operator in
conjunction with two comparison statements. For example, if you
want to find all records whose date falls from 7/1/93 to 9/30/93,
follow the steps below :
On the Tools menu, click Filters.
If you have not created any filters with this database file, name
the filter and click OK. If you have already created a
filter, click New Filter. Name the filter, and click
OK.
In the Field name box, select the Date field.
In the Comparison box, select Is Greater Than Or Equal
To.
In the Compare To box, type the starting range of the date.
For example:
7/1/93
Select the AND operator in the far left box of the second
row.
Repeat step 2 on the second row of query criteria.
On the second row of query criteria, repeat step 3, but select
Is Less Than Or Equal To.
On the second row of query criteria, repeat step 4, but type the
ending range of the date. For example, type the following:
9/30/93
Click Apply Filter.
Q. How do I filter on a specific month?
A. In the Works Database module, you can filter for dates that fall in a
particular month with the MONTH() function. The MONTH() function
returns an integer from 1 to 12 specifying the month of the given
date. For example, if you need to find records that have May in a
field named "Birthday," use the steps below:
On the Tools menu, click Filters.
If you have not created any filters with this database file, name the
filter and click OK. If you have already created a filter, click the
New Filter button. Name the filter and click OK.
Select Filter Using Formula.
Enter the following formula in the box:=month(birthday)=5
Click Apply Filter.NOTE: This example will match all records where a date entry
contains a month of May, regardless of the year. To find records in a
certain year, use the YEAR function. For example, to find records only
for May of 1995, use the following formula:
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.