XL98: How to Use Wildcards in Parameter Queries (188224)



The information in this article applies to:

  • Microsoft Excel 98 Macintosh Edition
  • Microsoft Query

This article was previously published under Q188224

SUMMARY

This article includes examples that show you how to use wildcards in parameter queries in Microsoft Query 98 Macintosh Edition.

MORE INFORMATION

Parameter 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 also can specify multiple parameters for a field.

In the Criteria cell under each field that you want to use as a parameter, type a prompt that is enclosed in 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 (e.g. abc%)]

 In           Equal to several values  In ([first],[second],[third])
              in a list multiple
				

For additional information, please see the following article in the Microsoft Knowledge Base:

180184 XL98: How to Create Parameter Queries

REFERENCES

For more information about Parameter Queries, click the Office Assistant, type "creating a query," click Search, and then click to view "Create a new query."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

179216 OFF98: How to Use the Microsoft Office Installer Program


Modification Type:MajorLast Reviewed:9/11/2002
Keywords:kbhowto kbualink97 KB188224