Once you've developed your skills in working with Access queries you may have created parameter queries. These let you enter different criteria into the query each time it is run. You can enter more than one parameter in the query design and use of multiple parameters can be a very effective way to allow complex record selection. It's very important to be aware of the different ways you can use multiple parameter criteria. This article describes how multiple parameters can be used within a query.

If you create a parameter query in query design view, you enter criteria data under one or more field headings in the form of text surrounded by square brackets. When the query is then run, a prompt appears displaying this text and an empty text box. The user types data into this box, clicks OK, and this data is passed to the query as the criteria data. If the user runs the query again and enters different data via the prompt, the query will of course show different results.

If you create more than one parameter in separate query fields, then when the query is run the parameter prompts appear in turn for each field criteria. So after you enter the data for the first parameter and click OK, the next parameter prompt appears, and so on, until all parameter data is entered. Once all the parameter data is entered the query finishes running and displays the results.

You can enter parameters into more than one field at a time in different ways in the query design view. You can enter the parameter criteria in different fields, in the same criteria row across the query. If you do this the query will display records which meet the first parameter entered AND the second AND the third and so on. So parameters entered across the same criteria row work like a logical AND. Alternatively you can enter parameter criteria down a column under a particular field. If you do this the query will display records which the first parameter entered OR the second OR the third and so on. So parameters entered down a criteria column under a field work like a logical OR.

You can of course combine this and enter a mix of parameters across one or more criteria row and down one or more criteria column. This can result in a relatively complex way the different criteria are used. However if you remember the rules of AND across the same criteria row and OR down the same criteria column, you can build very effective parameter mixes.

Parameter queries can allow users to enter different types of data into the query such as text or numbers or dates. We'll look now at an example using dates as parameter data.

An interesting use of multiple parameter queries is to use the same parameter criteria more than once in the query design, across the same criteria row. If you do this and run the query, the user enters data only once, and all the fields use this same criteria data. This can be very useful when working for example with dates as parameters. We'll describe an example next.

Say you have an Access table of records which include three date fields. The fields might be "Date Received", "Date Processed" and "Date Completed". You want to create a query which shows which records have dates for all three fields between certain dates. So you create your query and include these three dates. We'll want to use a parameter query which allows the user to specify two dates to give us our dates range. To do this the parameter criteria will look something like "BETWEEN [Enter date1] AND [Enter date2]" without the quote marks. You can type this into the first date criteria, and then copy and paste it into the other two fields without changing any parameter detail.

By the way when you come to copy the criteria from the first date field, you may see that the column containing the criteria is not wide enough to show all the data. You can see all the data by right clicking the criteria cell and choosing zoom. The zoom panel opens with all the criteria data highlighted. You can then copy this data, close the zoom panel, and paste the data into both the other two criteria cells. So now each date field in the query has the same parameter criteria.

Now run the query, enter the first date, then the second date. Then when you click OK both sets of parameter data are applied to all three date fields. The query results show records which fall within the range specified by the two parameter prompts for all three date fields.

Parameter queries are just one of the many useful design features you can work with using Microsoft Access. A really effective way of learning more is to attend a training course and then really boost your Access skills.