ACC2000: How to Create a Parameter In() Statement (210530)
The information in this article applies to:
This article was previously published under Q210530 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
SUMMARY
This article demonstrates two methods that you can use to pass multiple
values to a query by using a parameter prompt. The first method uses the
Instr() function to parse the parameter values entered when the query is run. The second method describes a way to create a query by using the In() operator with multiple values.
NOTE: You can see a demonstration of the technique that is used in this article in the sample file Qrysmp00.exe. For information about how to obtain this sample file, please see the following article in the Microsoft
Knowledge Base:
207626 ACC2000: Access 2000 Sample Queries Available in Download Center
NOTE: The sample code in this article uses Microsoft Data Access Objects. For this code to run properly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft DAO 3.6 Object Library check box is selected. REFERENCESFor more information about the In operator, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type in operator example (dao) in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 6/23/2005 |
---|
Keywords: | kbhowto kbinfo kbusage KB210530 |
---|
|