Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

HOW TO: Use Wildcard Characters in Microsoft Excel 2000 Parameter Queries


View products that this article applies to.

This article was previously published under Q211459

↑ Back to the top


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.

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


Keywords: KB211459, kbualink97, kbhowtomaster, kbhowto

↑ Back to the top

Article Info
Article ID : 211459
Revision : 3
Created on : 11/5/2003
Published on : 11/5/2003
Exists online : False
Views : 261