How To

How to Create a Parameter Query in Microsoft Access

Contributor
By eHow Contributing Writer
(11 Ratings)

A parameter query prompts you to provide data or information before the query is run. For example, you could query your database to show you the sales you have generated in the month of your choice. Each time you run the query, you will be prompted to identify the month that interests you. These instructions apply to Access 97.

Difficulty: Moderate
Instructions

Things You'll Need:

  1. Step 1

    Create a select or crosstab query in the usual way. (See Related eHows for instructions.)

  2. Step 2

    Click the Design button to change to Design view.

  3. Step 3

    Select all of the fields in the Field List (the rectangular box with field names that appears at the top half of the screen).

  4. Step 4

    Drag the field list into the query design grid (the grid that appears in the bottom half of the screen).

  5. Step 5

    Click in the Criteria cell for the field that you want to use as a parameter. In the example from the summary, you would use the field that shows the month.

  6. Step 6

    Type a prompt in the Criteria field, and enclose it in square brackets. In the example, you would type something like "[What month do you want?]"

  7. Step 7

    Click the View button on the toolbar.

  8. Step 8

    A prompt appears. Type the value (such as the month) that you want to use. The records matching your criteria will appear.

Tips & Warnings
  • If your field datatype is a date, you could enter criteria that would prompt you to enter both the beginning and the ending dates. It would be something like: Between [Enter the beginning date:] AND [Enter the ending date:].

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Computers
Alexia Petrakos,

Meet Alexia Petrakos eHow's Computers Expert.

Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US

eHow Computers
eHow_eHow Technology and Electronics