Jan's Working with Databases:

Parameter Query

Home > Jan's CompLit 101 > Working with Databases > Appendix

Example: Parameter Query

from LanguageArtsClasses.mdb

The query QCount of Test Grades by Class, groups the scores for an assignment or test based on the class and letter grade. A particular assignment/test ID has to be entered in the Criteria line. It is more flexible to have the query ask which assignment to look at.

Query Design View: Parameter Query


Dialog: Parameter messageBy writing [Enter Assignment/Test ID#:] in the Criteria cell instead of entering a specific ID number, when the query runs, a dialog appears that repeats what was typed between the square brackets. When you fill in the value and click OK, the query runs, with the input as the criteria. A much more flexible query than before!

In this case the user has to know the ID number of the assignment or test that she wants to look at. You can also create a form with a Lookup field that will show you what the choices are. When the choices are not completely obvious or the list is long or there are multiple parameters, a form can make it much easier to enter the right values. Keep the brain strain to a minimum!

Home > Jan's CompLit 101 > Working with Databases > Appendix

Last updated: September 17, 2012