Designing Parameter Queries

If you expect to run a summary or another type of query repeatedly with changes to the criteria, you can convert the query to a parameter query. Parameter queries—which Chapter 8, "Using Query by Example," explained briefly—enable you to enter criteria with the Enter Parameter Value dialog. You are prompted for each parameter required. For the example qryMonthlySales query that you created previously in this chapter, the only parameter likely to change is the range of dates for which you want to generate the product sales data. The two sections that follow show you how to add a parameter to a query and specify the data type of the parameter.

Figure 10.49. The SQL statement for a yearly sales summary by month.

Get Special Edition Using Access 97, Second Edition 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.