How to create a parameter query in Access 2000
In Microsoft Access queries have a very significant role, as getting a certain piece of information from a large database is quite impossible without them. In MS Access most of the queries follow particular criteria that are defined at the time of creation. However, sometimes you may need to input different criteria or modify the defined criteria to meet your requirements.
Parameter queries are such flexible queries that prompt user for additional criteria, if required. You can design a parameter query to prompt you for specific piece of information.
Creating queries with different parameters
Creating Parameter queries is all about setting different parameters. You can create queries with one or more parameters. Mentioned below are the steps to create queries with one or more than one parameters:
Creating queries with one parameter
-
Start Microsoft Access 2000 and then open the database.
-
On the View menu, click Database Objects, and then click Queries.
-
In the Database window, click the Purchase-Type query, and then click Design.
-
Type the following line in the Criteria cell for the CustomerName field. Note, that the expression that you enter must be enclosed in square brackets.
[View Purchase Type for Customer Name]
-
On the Query menu, click Run. When you are prompted, type Jacob, and then click OK to view the results of the query. Note that the query returns only those records whose Customer name is Jacob.
Creating queries with two or more parameters
-
Start Microsoft Access 2000 and then open the database
-
On the View menu, click Database Objects, and then click Queries.
-
In the Database window, click the Purchase-Type query, and then click Design.
-
Type the following line in the Criteria cell for the PurchaseDate field.
-
Between [Type the beginning date] And [Type the ending date]
-
On the Query menu, click Run. When you are prompted for the beginning date, type the beginning data e.g. 1/1/2009, and then click OK. When you are prompted for the ending date, type the ending date e.g. 1/31/2009 and then click OK to view the results of the query. Note that the query returns only records whose purchase date is in January 2009.
This way you can create queries with different parameters and can get the information with desired fields.
Use Kernel for Access Database Repair software if MDB file gets damaged. The software successfully repairs the damaged MDB file and helps you recover the lost data.