A dynamic parameter in an Access query allows for criteria to be entered by the user at runtime. This tutorial walks you through the basics of creating such a query.
In this tutorial:
Simple parameter
In the simple example that follows, we want to be able to query records based on gender. We want to be able to specify Male or Female at run time.


- Create a query based on the PopStars table
- Add the fields you require, including the Gender field
- In the Criteria row for the Gender field, enter the following text: Like [Female or Male: ]
- Run the query
- The Enter Parameter Value prompt will appear
- Enter Female (or Male)
- Click the OK button

Here is a REAL gotcha! You cannot use a parameter that is the same as the field name. In other words, in the Gender field, your parameter cannot be [Gender]
. It must be [Enter your gender]
or even just [Gender:]
Parameter with wildcard
Now replace the criteria in the Gender field in the query above with the following: Like [F(emale) or M(ale): ] & "*"
The & (ampersand) is Access’ concatenator. It “joins” strings together — in this case, it joins the user’s input with the * (wildcard) operator to form the criteria.
You will now only need to enter F (or M) to obtain the same results.
Dynamic parameters can be combined with static parameters.
Next steps
Coming soon: Create a Crosstab Query in Access
References:
- Microsoft Support. (2014) Use parameters to ask for input when running a query. Available at: https://support.microsoft.com/en-us/office/use-parameters-to-ask-for-input-when-running-a-query-c2806d3d-d500-45a8-8507-ec6af351b6ed (Accessed: 18 June 2023).