ACC2000: Parameter Query on Yes/No Field That Accepts Yes, No, and *

Article translations Article translations
Article ID: 198626 - View products that this article applies to.
This article was previously published under Q198626
This article has been archived. It is offered "as is" and will no longer be updated.
This article applies only to a Microsoft Access database (.mdb).

Novice: Requires knowledge of the user interface on single-user computers.

Expand all | Collapse all


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 these steps:
  1. Open the sample database Northwind.mdb.
  2. In the Database window, click Queries under Objects, and then click New.
  3. In the New Query dialog box, click Design View and click OK.
  4. In the Show Table dialog box, select the Products table, click Add, and then click Close.
  5. In the first column in the QBE grid, type the following:
    Field: MyParam: IIf([Discontinued]=-1, "Yes","No")
    Show: True
    Criteria: Like [Enter Yes, No or *]
  6. On the Query menu, click Run.
  7. Note that you are prompted with the Enter Parameter Value box. You can enter Yes, No, or *, where * returns all values.


For more information about Yes/No fields, please see the following articles in the Microsoft Knowledge Base:
209505 ACC2000: Expressions to Count Yes, No, and Other Responses

209700 ACC2000: Cannot Use "y," "n," "t," or "f" in Yes/No Field

209823 ACC2000: How to Use the LIKE Operator in Parameter Queries


Article ID: 198626 - Last Review: October 11, 2013 - Revision: 2.0
  • Microsoft Access 2000 Standard Edition
kbnosurvey kbarchive kbhowto KB198626

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from