Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009

    Unanswered: Query based on multiple parameters

    Hello all,

    I have a simple database with a district report, the user selects the district they need from a list in an unbound combo box and the report is ran using a command button. The query is simple with [forms]![report menu]![districtbx] in the criteria, and the query is the control source for the report.

    The users now want to be able to select muliple districts and have them shown in the same report, not sure whats the best way to do this, can a query be based on multiple parameters and if so how? The query shouldn't be using "or" in the criteria.


  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    A query such as the one you describe will have to use Or operators to link the different possibilities in its WHERE clause or will use a WHERE... IN ( ... ) construction.

    Depending on how the data are presented on the form, there are several possibilities to build such a clause, but in any case you'll probably have to build or alter the query (or at least it's WHERE clause) in the class module of the form. Nested IIf's can be very difficult to manage and maintain in a query.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts