ACC: MS Access Does Not Prompt for Second Parameter in Query

Last reviewed: August 6, 1997
Article ID: Q90148
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

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

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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0).

  2. 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:]
    
    

  3. 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.

  4. 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.

REFERENCES

For more information about using parameter queries, search the Help Index for "parameter queries."

Keywords          : QryParm kbusage
Version           : 1.0 1.10 2.0 7.0 97
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbprb
Solution Type     : Info_Provided


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.