1-866-245-5224 sales@keystonelearning.com

Access 2003: Multiple Parameter Queries

Access 2003: Multiple Parameter Queries

Just as a Single Parameter Query prompts the user for more information when a query is run, you can design a query to prompt you for more than one piece of information. Luckily, it really all works the same.

Creating A Multiple Parameter Query

     
  1. Open a Select Query in Design View
     
  2.  
  3. In the Criteria row of a field for which you want a parameter applied, type the text that you want the parameter dialog box to display, surrounded by square brackets, for example:
     

Between [Please Enter a Start Date] And [Please Enter a Finish Date]

   3.      Run the query several times, entering different values each time to test (Hint: You can run the query again from Datasheet view by pressing [SHIFT}+[F9])

Now, you probably noticed that when running the Single Parameter Query, if a user leaves the parameter prompt blank, occasionally no records are returned. You can fix that by adding an OR criteria.

Return ALL Records Using a Parameter Query

     
  1. Open a Select Query in Design View
     
  2.  
  3.       2.       In the Criteria row of a field for which you want a parameter applied, type the text that you
     

[Please Enter a Payment Type]     (Exact Match)

Like [Please Enter a Payment Type]&*    (Close Match)

   3.      In the OR row of the same field, type the text again adding the words “Is Null” to the end

[Please Enter a Payment Type] Is Null     (Exact Match)

Like [Please Enter a Payment Type]&* Is Null    (Close Match)

   4.      Run the query several times, entering different values each time to test (Hint: You can run the query again from Datasheet view by pressing [SHIFT}+[F9])