The information in this article applies to:
SUMMARYA parameter query is a kind of query that prompts you to specify values that are used to select the records for the result set. This allows the same query to be used to retrieve different results. You can create a custom prompt that describes the requested parameter and that is displayed when the query is run. MORE INFORMATION
A result set is a set of records that results when you run a query. You
can see the result set of a query in Microsoft Query or you can return
a result set to a Microsoft Excel worksheet for further analysis. Microsoft
Query displays the result set in row-and-column format in the Data pane.
ExampleThe following example, using the sample dBASE file Order.dbf, creates a parameter query that selects records by city. When you run the query, a prompt appears and displays "Type the name of the city." The result set returns only the records for the city that is entered by the user.NOTE: a parameter query is case-sensitive. To use this example, follow these steps:
Using the Like OperatorTo return all the data in a parameter query or partially matching records in a field, ensure that when you create the parameter, the leading parameter bracket ([) is preceded by the operator LIKE. LIKE is used in conjunction with the % wildcard. The % wildcard is similar to the * wildcard in MS-DOS, which returns all characters.For example, using the example above, change the parameter in step 9 from the following ["Enter a city."]to the following Like ["Enter a city."]To use this parameter and return all records that begin with the letter "S," type S% in the Enter Parameter Value dialog box. To return all records, enter the % by itself. For additional information, please see the following articles in the Microsoft Knowledge Base: Q188224 XL98: How to Use Wildcards in Parameter Queries Additional query words: OFF98 xl98 msquery
Keywords : xlquery |
Last Reviewed: August 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |