[ Team LiB ] Previous Section Next Section

Creating a Parameter Query

graphics/microsoft147_1.gif

When you need to change the criterion value for a query, you either must edit the old query or create a new one. However, if the change involves simply altering a value, you might consider using a parameter query. A parameter query prompts the user for the value of a particular query field, rather than having the value built into the query itself. For example, if you want to display the records for particular toy types, a parameter query can prompt you for the type, saving you from creating a separate query for each type.

Create a Parameter Query

graphics/1_icon.jpg

In Query Design view, click the Criteria box.

graphics/2_icon.jpg

Enter the text of the prompt surrounded by square brackets.

graphics/3_icon.jpg

Click the Run button on the Query Design toolbar.

graphics/4_icon.jpg

Enter a criteria name in response to the prompt.

graphics/5_icon.jpg

Click OK.

graphics/06inf15.jpg

Did You Know?

You can rename a field. Access assigns a name to a calculated field. If you want a different name, click the field in the design grid, and then click the Properties button on the Query Design toolbar. Enter a new name in the Caption box, and then click OK.


    [ Team LiB ] Previous Section Next Section