Article ID: 304353 - Last Review: August 9, 2004 - Revision: 2.2 How to create a parameter query in Access 2000This article was previously published under Q304353 SUMMARY You can use criteria in a query in Microsoft Access to
restrict the set of records that the query returns. To query for different
records each time that you run a particular query, you may want the query to
prompt you for criteria to enter, for example, "a date from" to "a date to." A
query that prompts you for criteria is called a parameter query. This article
shows you how to create parameter queries in Microsoft Access. A parameter query displays its own dialog box that prompts you for information. You can design a query to prompt you for one piece of information, for example, a part number, or for more than one piece of information, for example, two dates. Microsoft Access will then retrieve all the records that contain that part number or all the records that fall between those two dates. You can also use parameter queries as the basis for forms, reports, and data access pages. For example, you can create a monthly earnings report based on a parameter query. When you print the report, Access displays a dialog box asking for the month that you want the report to cover. You enter a month, and then Access prints the appropriate report. You can also do the following with parameter queries, forms, and reports:
How to Create a Query with One Parameter
How to Create a Query with Two or More Parameters
How to Create Parameters That Use WildcardsThe following example shows you how to create parameters that use the LIKE operator and the wildcard symbol (*).
REFERENCES For more information about how to create queries in
Microsoft Access, click the "Working with Queries" topic on the Microsoft
Access 2000 Help page at the following Microsoft Web site: Microsoft Access 2000 Help
(http://office.microsoft.com/assistance/offhelp.aspx)
For
additional information about using forms or custom dialog boxes for parameter
queries, click the article number below to view the article in the Microsoft
Knowledge Base: 209645
(http://support.microsoft.com/kb/209645/EN-US/
)
ACC2000: How to Use the Query by Form (QBF) Technique
For additional information about creating crosstab queries
with multiple value fields, click the article number below to view the article
in the Microsoft Knowledge Base: 209143
(http://support.microsoft.com/kb/209143/EN-US/
)
ACC2000: Creating a Crosstab Query with Multiple Value Fields
For additional information about creating select queries,
click the article number below to view the article in the Microsoft Knowledge
Base: 304361
(http://support.microsoft.com/kb/304361/EN-US/
)
ACC2000: How to Create a Select Query in Microsoft Access
For additional
information about creating parameter queries, click the article number below to
view the article in the Microsoft Knowledge Base: 304352
(http://support.microsoft.com/kb/304352/EN-US/
)
HOW TO: Create a Parameter Query in Microsoft Access 2002
For additional information about how to convert a select query
to an action query, click the article number below to view the article in the
Microsoft Knowledge Base: 304355
(http://support.microsoft.com/kb/304355/EN-US/
)
ACC2000: How to Convert a Select Query to an Action Query
For additional information about modifying query properties,
click the article number below to view the article in the Microsoft Knowledge
Base: 304357
(http://support.microsoft.com/kb/304357/EN-US/
)
ACC2000: How to Modify Query Properties in Microsoft Access
To download a sample Microsoft Access database that
contains over 20 query examples, including the techniques described in these
articles, see the following article in the Microsoft Knowledge Base:
207626
(http://support.microsoft.com/kb/207626/EN-US/
)
ACC2000: Access 2000 Sample Queries Available in Download Center
| Article Translations
|
Back to the top
