January 31, 2008
Steven Thomas
Want to make your query ask for input when it runs? Watch these demos to see how you can add parameters to a query, handle input that is the wrong kind of data, and use a form to collect parameters and then use them with multiple queries.
You can add parameters to a query in Design view (Design view: A window that shows the design of these database objects: tables, queries, forms, reports, macros, and data access pages. In Design view, you can create new database objects and modify the design of existing ones.). This first video demonstrates how to use parameters to make a query ask for a start date and an end date, and then use those values to limit the records returned.
To make your parameter query more robust, you can specify the data type that each parameter expects. This demo builds on the first example to show you how.
If you want to reuse input values with multiple queries, you can create a form to collect parameters, and then connect that form to the queries you want. This demo builds on the previous two examples.
Note This demo does not show you everything you might want to do with a parameter form. It shows you how to create a form, add controls to collect input, and use the input in your query design.