[Previous] [Content Page] [Next]
A Quick Review
Figure 6-1. The in Design view.
Figure 6-2. A close-up of the design grid.
Before we start tackling the functions and types of queries, let's take a step back and review. This lesson is more of a "cheat sheet" than an exercise. Hopefully, it will help you remember what you already know about queries. Figure 6-1 shows the in Design view, Figure 6-2 shows a close-up of the design grid, and Table 6-1 outlines the Common Criteria Operators.
Table 6-1. Common Criteria Operators
|
Operator
|
Example
|
Description
|
|
=
|
="MN"
|
Finds records equal to MN.
|
| |
"MN"
|
Finds records not equal to MN.
|
|
<
|
<10
|
Finds records less than 10.
|
|
< =
|
<=10
|
Finds records less than or equal to 10.
|
|
>
|
>10
|
Finds records greater than 10.
|
|
> =
|
>=10
|
Finds records greater than or equal to 10.
|
|
BETWEEN
|
BETWEEN 1/1/99 AND 12/31/99
|
Finds records between 1/1/99 AND 12/31/99.
|
|
LIKE
|
LIKE "S*"
|
Finds text beginning with the letter "S." You can use LIKE with wildcards such as *.
|
|
NOT
|
NOT "MN"
|
Finds records not equal to MN.
|
|
IS NULL
|
IS NULL
|
Finds records whose fields are empty.
|
|
IS NOT NULL
|
IS NOT NULL
|
Finds records whose fields contain values.
|
Reference
TO CREATE A QUERY IN DESIGN VIEW:
-
CLICK THE QUERIES ICON IN THE OBJECTS BAR, THEN DOUBLE-CLICK CREATE QUERY IN DESIGN VIEW.
-
SELECT THE TABLE OR QUERY YOU WANT TO USE AND CLICK ADD.
-
REPEAT STEP 2 AS NECESSARY FOR ADDITIONAL TABLES OR QUERIES. CLICK CLOSE WHEN YOU'RE FINISHED.
-
DOUBLE-CLICK EACH FIELD YOU WANT TO INCLUDE FROM THE FIELD LIST.
OR...
DRAG THE FIELD FROM THE FIELD LIST ONTO THE DESIGN GRID.
-
IN THE DESIGN GRID, ENTER ANY DESIRED SEARCH CRITERIA FOR THE FIELD IN THE CRITERIA ROW.
-
CLICK THE SORT BOX LIST ARROW FOR THE FIELD AND SELECT A SORT ORDER.
-
-
CLICK YES TO SAVE THE QUERY, ENTER A QUERY NAME, AND THEN CLICK OK.

|
|
[Previous] [Content Page] [Next]