SUMMARY
This article describes various wildcard characters that you can use in parameter queries in Microsoft Query.
A parameter query, when you run it, prompts for values (criteria) to use to select the records for the result set so that the same query can be used to retrieve different result sets. By using a parameter query, you do not have to change the query design grid each time that you run the query. Instead, Microsoft Query prompts you for the search criteria. You can specify multiple parameters for a field.
back to the top
Microsoft Query Wildcard Character Examples
In the
Criteria cell under each field that you want to use as a parameter, type a prompt that is enclosed in square brackets. Microsoft Query displays this prompt when you run the query. The text of the prompt must be different from the field name; however, the prompt can include the field name.
The wildcard characters that are available in Microsoft Query and examples
for using these characters in a parameter query are listed in the following
table.
Wildcard Parameter
character Definition query example
---------------------------------------------------------------------
+ Addition [Enter Price]+[Cost of Freight]
- Subtraction [Enter Price]-[Cost of Freight]
* Multiplication [Enter Price]*[Enter Quantity]
/ Division [Enter Price]/[Enter Quantity]
= Equal to =[What city?]
<> Not equal to <>[All cities but what?]
> Greater than >[Greater than date?]
< Less than <[Less than date?]
>= Greater than or
equal to >=[Greater than or equal to date?]
<= Less than or
equal to <=[Less than or equal to date?]
And Both values found >[Greater than date?] And
in the record set <[Less than date?]
Or Either value found
in the record set [What city?] Or [What other city?]
Not Value not found
in the record set Not [All cities but what?]
Between Range of values Between [start date] and
between what two values [end date]
Like Compares values to Like [Enter letter(s) followed by
find a similar value the % sign (for example, abc%)]
In Equal to several values In ([first],[second],[third])
in a list
back to the top
REFERENCES
For more information about parameter queries, click
Microsoft Query Help on the
Help menu, type
Create a new query in the Office Assistant or the Answer Wizard, and then click
Search to view the topic.
back to the top