Microsoft KB Archive/90148

= ACC: Microsoft Access Does Not Prompt for Second Parameter in Query =

Article ID: 90148

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Access 1.0 Standard Edition
 * Microsoft Access 1.1 Standard Edition
 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q90148



Novice: Requires knowledge of the user interface on single-user computers.



SYMPTOMS
Microsoft Access does not prompt you for the second parameter in a query, even though it does prompt you for the first parameter.



CAUSE
The parameter text in the criteria fields is identical for both parameters. Each prompt for a user-entered parameter must contain a unique text string.



RESOLUTION
Change the text in the criteria field for one of your parameters to make it unique.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0).  Create the following new query based on the Products table:

     Query: TestParameter ---     Type: Select Query

Field: ProductID (or Product ID in versions 1.x and 2.0) Table: Products Criteria: [Enter Value:] Field: ProductName (or Product Name in versions 1.x and 2.0) Table: Products Criteria: [Enter Value:]  Run the query and note that Microsoft Access only asks you for the parameter one time because it treats the two [Enter Value:] criteria as the same parameter. After you provide a value for the first parameter, Microsoft Access uses that value for the second parameter as well. Open the TestParameter query in Design view, change the [Enter Value:] criteria in the ProductName column to [Enter Name:], and then run the query again. Note that Microsoft Access prompts you for both parameters.</ol>

<div class="references_section">