Make a query ask for input
The type of query that you created in the previous section can return a lot of data. A common way to limit what the query returns is to use a parameter. Put simply, parameters make the query ask for input before it runs. For example, if you only want to see records between certain dates, you can add parameters that make the query ask you for starting and ending dates, and the query will give you just the records that fall between those dates.
In other words, parameters are a type of filter that you build in to your query.
-
Open the query in Design view, and in the Criteria row of the field you want to filter, enter your parameter. For example, you can use the criteria shown in the picture, and you'll get a chance to do that in the practice session.
-
When you run the query, that criteria asks you for a start date, then an end date, and it returns only the records that fall within the dates you specify.
Criteria can become complex, so links in the Quick Reference Card take you to more information about using them.
Topic 5 of 9
No comments:
Post a Comment