Tuesday, March 13, 2012

Creating a Parameter Query

Create a query using the Design View.

In query Design view, drag the fields from the field list to the query design grid.

In the Criteria cell for each field you want to use as a parameter, type an expression with a prompt enclosed in square brackets. To prompt the user for one or more characters to search for, and then find records that begin with or contain the characters the user specifies, create a parameter query that uses the LIKE operator and the wildcard symbol (*).


For example, the following statement searches for words that begin with a specified letter:

LIKE [Enter the first character to search by: ] & "*"
 
 

Result:

The following  statement searches for words that contain the specified character:
LIKE "*" & [Enter any character to search by: ] & "*"
 
 
 
 
 
 
 
 
 
Results:
 

No comments:

Post a Comment