XL97: How to Use Wildcards in Parameter QueriesLast reviewed: February 12, 1998Article ID: Q164117 |
The information in this article applies to:
SUMMARYThis article includes examples that use wildcards in parameter queries in Microsoft Query.
MORE INFORMATIONParameter queries prompt you for values to use when querying for the result set that is returned. This allows you to use one query that selects different records based upon criteria you specify. By using a parameter query, you don't have to change the query design grid each time you run the query. Instead, Microsoft Query prompts you for the search criteria. You can specify multiple parameters for a field. In the Criteria cell under each field 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]
* 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 (e.g. abc%)]The characters that are not available in a parameter query are listed in the following table.
Wildcard character Definition Notes --------------------------------------------------------------------- In Equal to several values Use the And operator with in a list multiple prompts. Is Null No value in the field Is Not Null Field contains a value REFERENCESFor more information about parameter queries, click the Index tab in Microsoft Query Help, type the following text
parameterand then double-click the selected text to go to the "Create a parameter query" topic.
|
KBCategory: kbusage kbtool
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |