Using Query Parameters

So far, you’ve been entering selection criteria directly in the design grid of the Query window in Design view. However, you don’t have to decide at the time you design the query exactly what value you want Access to search for. Instead, you can include a parameter in the query, and Access will prompt you for the criteria each time the query runs.

To include a parameter, you enter a name or a phrase enclosed in brackets ([ ]) in the Criteria row instead of entering a value. What you enclose in brackets becomes the name by which Access knows your parameter. Access displays this name in a dialog box when you run the query, so you should enter a phrase that accurately describes what you want. You can enter several parameters ...

Get Microsoft® Access® 2010 Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.