How do you create a parameter query?

1 answer

Answer

1207924

2026-04-12 03:35

+ Follow

Open a new query in Design view and add the table you want. Add the fields you want into the design grid. Under the field you want to be able to have a parameter for, in the Criteria row enter a meaningful message inside square brackets. So if you were looking for the user to enter a department that would then be used as the criteria, you could have something like the following in the Criteria row under that field:

[Enter a department]

When the query is run, it will prompt you with whatever has been typed into the square brackets and you can then type in what you want into the dialog box that pops up. Whatever you type will be used as the criteria. It is not important what exactly is typed into the square brackets. It is the square brackets themselves that are important. Without them, what you type in the criteria could be treated as text and have quotes put around it, or as a number or whatever the data type of the field is. Access does not know what the text in the square bracket means and it is asking you for something, which is how a parameter query works. You can also use some operators with it. So if you wanted to only show values above a certain level, you could put the greater than sign before the parameter, like this:

>[Enter a value]

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.