ACC: How to Create a Parameter Query on a Yes/No Field That Accepts Yes, No, and *ID: Q174907
|
Novice: Requires knowledge of the user interface on single-user computers.
This article describes how to create a parameter query that uses a Yes/No
data type field that accepts the values of Yes, No, and * (asterisk), where
* returns all values in the field.
To create a parameter query that displays all records that contain Yes, No,
or all values, follow the steps for your version of Microsoft Access. Steps
1 through 3 are different; step 4 through 7 are the same for all versions.
In Microsoft Access 2.0
-----------------------
Field: MyParam: IIf([Discontinued]=-1, "Yes","No")
Show: True
Criteria: Like [Enter Yes, No or *]
Field: Enter Yes, No or *: [Discontinued,*0/-1/*]
Show: False
For more information about Yes/No fields, please see the following
articles in the Microsoft Knowledge Base:
Q101076 ACC: Expressions to Count Yes, No, and Other Responses
Q94391 ACC: Cannot Use "y," "n," "t," or "f" in Yes/No Field
Q88671 ACC: How to Use the LIKE Operator in Parameter Queries
Additional query words: inf
Keywords : QryParm QryHowto QryCrit TblDatyp
Version : WINDOWS:2.0,7.0,97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 27, 1999