Create a parameter query in Access
Instead of building one query per country, month or payment method, a parameter query asks for the value when it opens. One query, many lists.
In short: write a question in square brackets as the criterion, such as [Which country?]. Because Access knows no field by that name, it shows the “Enter Parameter Value” box when the query runs and uses the answer as the criterion.
Before you start: Calculated fields and criteria from level 1.
Try it now
In the exercises nobody types the answer: the exercise supplies the value and shows it below the result. The hidden check enters a different value, so a fixed country is caught.
Task Build a query that asks for the country when it opens: Company, LastName and City of the customers in the country entered. The exercise enters UK.
Customers 25 rows, 10 columns
| CustomerID | Company | FirstName | LastName | City | PostalCode | Country | CustomerSince | Regular | Discount |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Noah | Evans | Leeds | LS1 1UR | UK | 28 Feb 2023 | ☑ | 0.1 | |
| 2 | Shaw & Partners | Noah | Davies | Glasgow | G1 1XQ | UK | 5 Feb 2024 | ☐ | 0.03 |
| 3 | Northlight Inc | Sophia | Hall | Denver | 80202 | USA | 30 Jun 2024 | ☑ | 0 |
| 4 | Olivia | Evans | Bristol | BS1 4DJ | UK | 29 Jun 2022 | ☑ | 0 | |
| 5 | Olivia | Smith | London | EC1A 1BB | UK | 23 Sep 2025 | ☑ | 0 | |
| 6 | Northlight Inc | Mia | Evans | Manchester | M1 1AE | UK | 1 Feb 2025 | ☐ | 0.1 |
| 7 | Bauer Ltd | Ava | Wilson | UK | 14 Oct 2024 | ☐ | 0.05 | ||
| 8 | Lucas | Taylor | Glasgow | G1 1XQ | UK | 2 Jul 2023 | ☐ | 0 | |
| 9 | Jack | Clark | Seattle | 98101 | USA | 7 Nov 2022 | ☐ | 0.1 | |
| 10 | Northlight Inc | Henry | Taylor | Denver | 80202 | USA | 3 Nov 2022 | ☑ | 0.1 |
| 11 | Northlight Inc | Oliver | Johnson | Bristol | BS1 4DJ | UK | 6 Mar 2024 | ☐ | 0 |
| 12 | Henry | Taylor | Chicago | 60601 | USA | 24 Dec 2023 | ☐ | 0 | |
| 13 | Northlight Inc | Noah | Taylor | London | EC1A 1BB | UK | 12 Oct 2022 | ☐ | 0 |
| 14 | Summit Consulting | Mia | Smith | Austin | 78701 | USA | 6 Feb 2022 | ☑ | 0 |
| 15 | Mia | Clark | Austin | 78701 | USA | 9 Mar 2022 | ☑ | 0.05 | |
| 16 | Chloe | Hall | Seattle | 98101 | USA | 4 May 2022 | ☐ | 0.03 | |
| 17 | Market Street Clinic | Sophia | Johnson | Boston | 02108 | USA | 4 Jun 2023 | ☑ | 0 |
| 18 | Roth Legal | Mia | Wright | Manchester | M1 1AE | UK | 23 Sep 2022 | ☑ | 0.05 |
| 19 | Northlight Inc | Grace | Wright | UK | 16 Dec 2023 | ☐ | 0.03 | ||
| 20 | Northlight Inc | Olivia | Brown | Boston | 02108 | USA | 19 Jun 2023 | ☐ | 0.03 |
| 21 | Liam | Brown | Boston | 02108 | USA | 23 Jun 2025 | ☐ | 0.03 | |
| 22 | Bauer Ltd | James | Johnson | Manchester | M1 1AE | UK | 5 Jun 2025 | ☐ | 0.05 |
| 23 | Noah | Wilson | Austin | 78701 | USA | 23 May 2022 | ☐ | 0 | |
| 24 | Market Street Clinic | James | Smith | Bristol | BS1 4DJ | UK | 16 Jan 2022 | ☐ | 0.1 |
| 25 | Northlight Inc | Sophia | Hall | Denver | 80202 | USA | 4 Aug 2025 | ☑ | 0 |
How a parameter works
When the query runs, Access goes through every name in it. Anything that is neither a field nor a function becomes a parameter: Access opens a box with the bracket text as the question. The answer replaces the parameter, then the query runs as with a fixed criterion.
| Criterion | asks for | finds |
|---|---|---|
[Which country?] | a country | exactly that country |
Like [Name begins with?] & "*" | the start of a name | all names with that start |
Between [From?] And [To?] | two dates | the period in between |
The bracket text may contain spaces and question marks, but must not match a field name, or Access uses the field.
Task Accounts needs the orders per payment method: OrderID and OrderDate, asking for the payment method, sorted by order date. The exercise enters PayPal.
Orders 120 rows, 6 columns
| OrderID | CustomerID | OrderDate | ShippedDate | Freight | PaymentMethod |
|---|---|---|---|---|---|
| 1 | 16 | 30 Apr 2025 | 3 May 2025 | 4.90 | Invoice |
| 2 | 23 | 18 May 2025 | 26 May 2025 | 4.90 | PayPal |
| 3 | 19 | 16 Jul 2026 | 4.90 | Direct debit | |
| 4 | 11 | 31 Mar 2025 | 1 Apr 2025 | 0.00 | Invoice |
| 5 | 6 | 7 Dec 2025 | 9 Dec 2025 | 9.90 | PayPal |
| 6 | 18 | 19 May 2026 | 26 May 2026 | 6.90 | Direct debit |
| 7 | 7 | 15 Jun 2026 | 16 Jun 2026 | 4.90 | Credit card |
| 8 | 20 | 18 Mar 2025 | 19 Mar 2025 | 0.00 | PayPal |
| 9 | 10 | 29 Oct 2025 | 3 Nov 2025 | 0.00 | Direct debit |
| 10 | 7 | 21 Nov 2026 | 4.90 | Invoice | |
| 11 | 1 | 2 May 2025 | 10 May 2025 | 9.90 | Direct debit |
| 12 | 10 | 7 Aug 2025 | 9 Aug 2025 | 0.00 | Invoice |
| 13 | 3 | 17 Sep 2026 | 24 Sep 2026 | 9.90 | PayPal |
| 14 | 16 | 29 Jan 2026 | 1 Feb 2026 | 6.90 | Invoice |
| 15 | 4 | 13 Jun 2025 | 21 Jun 2025 | 4.90 | PayPal |
| 16 | 12 | 3 Nov 2025 | 12 Nov 2025 | 4.90 | Invoice |
| 17 | 9 | 5 May 2026 | 8 May 2026 | 9.90 | PayPal |
| 18 | 9 | 26 Sep 2025 | 2 Oct 2025 | 4.90 | PayPal |
| 19 | 14 | 8 Mar 2026 | 10 Mar 2026 | 0.00 | Credit card |
| 20 | 1 | 2 Apr 2026 | 6.90 | PayPal | |
| 21 | 18 | 17 Nov 2026 | 4.90 | PayPal | |
| 22 | 11 | 27 Jul 2026 | 4 Aug 2026 | 4.90 | PayPal |
| 23 | 12 | 23 Jun 2026 | 28 Jun 2026 | 4.90 | Credit card |
| 24 | 10 | 12 Jan 2026 | 16 Jan 2026 | 0.00 | Direct debit |
| 25 | 1 | 30 Mar 2026 | 31 Mar 2026 | 4.90 | Credit card |
| 26 | 3 | 3 Mar 2025 | 7 Mar 2025 | 4.90 | Invoice |
| 27 | 24 | 9 Mar 2025 | 11 Mar 2025 | 4.90 | PayPal |
| 28 | 1 | 22 Sep 2025 | 28 Sep 2025 | 4.90 | PayPal |
| 29 | 1 | 18 Feb 2025 | 22 Feb 2025 | 4.90 | Invoice |
| 30 | 19 | 13 Oct 2025 | 18 Oct 2025 | 4.90 | PayPal |
| 31 | 10 | 19 Sep 2025 | 25 Sep 2025 | 6.90 | PayPal |
| 32 | 6 | 19 Jun 2026 | 24 Jun 2026 | 4.90 | Credit card |
| 33 | 20 | 16 Jun 2026 | 22 Jun 2026 | 9.90 | Credit card |
| 34 | 13 | 23 May 2026 | 27 May 2026 | 9.90 | Direct debit |
| 35 | 16 | 24 May 2026 | 2 Jun 2026 | 4.90 | PayPal |
| 36 | 14 | 9 Nov 2026 | 14 Nov 2026 | 4.90 | PayPal |
| 37 | 3 | 11 Mar 2026 | 18 Mar 2026 | 9.90 | PayPal |
| 38 | 22 | 2 Jan 2025 | 10 Jan 2025 | 0.00 | Invoice |
| 39 | 12 | 21 Oct 2025 | 27 Oct 2025 | 0.00 | Invoice |
| 40 | 20 | 4 Nov 2026 | 5 Nov 2026 | 9.90 | PayPal |
| 41 | 17 | 29 Mar 2026 | 30 Mar 2026 | 4.90 | PayPal |
| 42 | 13 | 6 Jan 2026 | 8 Jan 2026 | 0.00 | Invoice |
| 43 | 3 | 24 Feb 2026 | 26 Feb 2026 | 4.90 | PayPal |
| 44 | 7 | 21 Sep 2026 | 28 Sep 2026 | 4.90 | Invoice |
| 45 | 2 | 17 Apr 2025 | 23 Apr 2025 | 0.00 | Direct debit |
| 46 | 7 | 27 Apr 2026 | 28 Apr 2026 | 4.90 | Invoice |
| 47 | 3 | 16 Nov 2026 | 6.90 | Direct debit | |
| 48 | 1 | 26 Jun 2026 | 27 Jun 2026 | 4.90 | Credit card |
| 49 | 24 | 29 Apr 2026 | 30 Apr 2026 | 4.90 | PayPal |
| 50 | 1 | 23 Mar 2025 | 28 Mar 2025 | 4.90 | Direct debit |
| 51 | 10 | 28 Jan 2026 | 31 Jan 2026 | 0.00 | PayPal |
| 52 | 22 | 9 May 2026 | 15 May 2026 | 4.90 | Direct debit |
| 53 | 10 | 29 Dec 2025 | 7 Jan 2026 | 0.00 | Credit card |
| 54 | 4 | 17 Oct 2026 | 18 Oct 2026 | 9.90 | Credit card |
| 55 | 24 | 30 Aug 2025 | 31 Aug 2025 | 6.90 | Credit card |
| 56 | 6 | 29 Jan 2026 | 2 Feb 2026 | 4.90 | PayPal |
| 57 | 18 | 10 Dec 2025 | 13 Dec 2025 | 6.90 | Direct debit |
| 58 | 13 | 4 Mar 2025 | 9 Mar 2025 | 9.90 | Invoice |
| 59 | 11 | 29 Nov 2025 | 7 Dec 2025 | 6.90 | Invoice |
| 60 | 9 | 30 Oct 2025 | 4 Nov 2025 | 4.90 | Invoice |
| 61 | 10 | 17 Mar 2026 | 19 Mar 2026 | 4.90 | PayPal |
| 62 | 9 | 14 Jul 2025 | 21 Jul 2025 | 4.90 | PayPal |
| 63 | 8 | 24 May 2025 | 2 Jun 2025 | 0.00 | Invoice |
| 64 | 4 | 29 Sep 2026 | 5 Oct 2026 | 4.90 | Invoice |
| 65 | 10 | 22 Jan 2026 | 27 Jan 2026 | 9.90 | Invoice |
| 66 | 9 | 27 Mar 2026 | 28 Mar 2026 | 9.90 | Credit card |
| 67 | 14 | 11 Sep 2026 | 18 Sep 2026 | 4.90 | PayPal |
| 68 | 4 | 9 Jun 2026 | 16 Jun 2026 | 0.00 | Invoice |
| 69 | 17 | 10 Jan 2026 | 17 Jan 2026 | 9.90 | Credit card |
| 70 | 21 | 1 Apr 2026 | 2 Apr 2026 | 4.90 | Credit card |
| 71 | 15 | 19 Mar 2025 | 21 Mar 2025 | 4.90 | Credit card |
| 72 | 20 | 4 Mar 2025 | 6 Mar 2025 | 4.90 | Invoice |
| 73 | 10 | 24 May 2025 | 9.90 | PayPal | |
| 74 | 8 | 3 Jan 2025 | 4 Jan 2025 | 9.90 | Invoice |
| 75 | 23 | 30 Oct 2025 | 6 Nov 2025 | 9.90 | Direct debit |
| 76 | 22 | 30 Aug 2025 | 3 Sep 2025 | 6.90 | Invoice |
| 77 | 2 | 18 Nov 2025 | 23 Nov 2025 | 6.90 | PayPal |
| 78 | 3 | 22 Dec 2025 | 26 Dec 2025 | 4.90 | Invoice |
| 79 | 21 | 26 May 2026 | 6.90 | Invoice | |
| 80 | 24 | 23 Feb 2026 | 27 Feb 2026 | 4.90 | Direct debit |
| 81 | 2 | 5 Jun 2026 | 6.90 | PayPal | |
| 82 | 11 | 14 Aug 2026 | 6.90 | Invoice | |
| 83 | 21 | 10 May 2026 | 18 May 2026 | 9.90 | Credit card |
| 84 | 13 | 12 Feb 2025 | 19 Feb 2025 | 4.90 | Credit card |
| 85 | 2 | 22 Jan 2026 | 30 Jan 2026 | 4.90 | PayPal |
| 86 | 2 | 31 Oct 2025 | 4 Nov 2025 | 9.90 | Credit card |
| 87 | 6 | 9 Mar 2025 | 17 Mar 2025 | 9.90 | Credit card |
| 88 | 3 | 5 Feb 2025 | 14 Feb 2025 | 9.90 | Direct debit |
| 89 | 17 | 26 Jan 2025 | 29 Jan 2025 | 6.90 | PayPal |
| 90 | 11 | 25 Sep 2026 | 4.90 | Direct debit | |
| 91 | 22 | 23 May 2025 | 1 Jun 2025 | 4.90 | Credit card |
| 92 | 20 | 29 Jan 2025 | 2 Feb 2025 | 0.00 | PayPal |
| 93 | 8 | 16 Jul 2026 | 18 Jul 2026 | 6.90 | Invoice |
| 94 | 2 | 7 Aug 2025 | 10 Aug 2025 | 0.00 | Invoice |
| 95 | 22 | 6 Jan 2025 | 8 Jan 2025 | 6.90 | Credit card |
| 96 | 15 | 15 Dec 2025 | 24 Dec 2025 | 4.90 | Invoice |
| 97 | 6 | 23 Sep 2025 | 30 Sep 2025 | 6.90 | Invoice |
| 98 | 10 | 10 Sep 2025 | 16 Sep 2025 | 0.00 | Invoice |
| 99 | 14 | 10 Jan 2026 | 13 Jan 2026 | 9.90 | Credit card |
| 100 | 16 | 20 Nov 2025 | 24 Nov 2025 | 0.00 | Credit card |
| 101 | 18 | 26 Jul 2026 | 27 Jul 2026 | 4.90 | Credit card |
| 102 | 2 | 15 May 2025 | 9.90 | Invoice | |
| 103 | 4 | 8 Feb 2025 | 15 Feb 2025 | 6.90 | Credit card |
| 104 | 7 | 16 Sep 2026 | 17 Sep 2026 | 4.90 | Invoice |
| 105 | 7 | 26 Jan 2025 | 31 Jan 2025 | 4.90 | Direct debit |
| 106 | 23 | 2 Aug 2026 | 3 Aug 2026 | 6.90 | Direct debit |
| 107 | 13 | 22 Jan 2026 | 26 Jan 2026 | 9.90 | Credit card |
| 108 | 4 | 6 Oct 2025 | 14 Oct 2025 | 4.90 | Direct debit |
| 109 | 10 | 6 Nov 2025 | 9 Nov 2025 | 4.90 | Direct debit |
| 110 | 9 | 17 Oct 2026 | 18 Oct 2026 | 9.90 | PayPal |
| 111 | 23 | 24 May 2026 | 25 May 2026 | 6.90 | Direct debit |
| 112 | 2 | 31 Aug 2025 | 1 Sep 2025 | 9.90 | Direct debit |
| 113 | 20 | 25 Jul 2026 | 28 Jul 2026 | 0.00 | Direct debit |
| 114 | 6 | 24 Nov 2025 | 27 Nov 2025 | 9.90 | Credit card |
| 115 | 8 | 27 Nov 2025 | 30 Nov 2025 | 6.90 | Credit card |
| 116 | 1 | 18 Mar 2025 | 25 Mar 2025 | 0.00 | Direct debit |
| 117 | 9 | 16 Mar 2025 | 19 Mar 2025 | 6.90 | Credit card |
| 118 | 4 | 10 Jul 2026 | 15 Jul 2026 | 0.00 | Invoice |
| 119 | 14 | 23 Jun 2025 | 28 Jun 2025 | 4.90 | Direct debit |
| 120 | 2 | 21 Sep 2026 | 27 Sep 2026 | 4.90 | Direct debit |
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
In real Access
- In query Design view, enter
[Which country?]under the field. - Run: the “Enter Parameter Value” box appears with your question. Type the value, OK.
- For dates and numbers it pays to set the data type: Query Design tab, Parameters, enter the name (exactly as in the criterion) and the data type. Access then checks the entry right away.
- Save. Every time it opens it asks again; a form or report based on the query asks too.
Common mistakes
An unwanted parameter
If Access asks for a value although you wanted no parameter, a field name is almost always misspelled. The box shows the name Access does not know.
Two spellings
[From?] and [from ?] are two parameters, so Access asks twice. Use exactly the same text for the same value.
An empty answer
If the box is left empty, the parameter is Null and =[Which country?] finds nothing. With Like [Which country?] & "*" an empty answer shows every country.
FAQ
Can a form field replace the box?
Yes, with a reference like [Forms]![Search]![Country]. The query then reads the value from the open form. That comes in level 5.
How many parameters can a query have?
Several are fine; Access asks one after the other.