Fix a Microsoft Access Parameter Query for Yes/No Fields
Question details
The user needs an Access parameter query that filters a Yes/No field when the user selects or enters a value.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A query prompts the user to filter records by a Yes/No field.
- Observed behavior
- Entering the words Yes or No may return no results because the query needs a Boolean value.
Open the database in Microsoft Access and identify the Yes/No field and query you want to filter. In Access, True is represented by -1 and False by 0.
Convert a Yes/No text parameter to a Boolean value
Use this method when you want to keep a typed parameter prompt.
In the Navigation Pane, right-click the query and select Design View.
In the Criteria row under the Yes/No field, enter IIf([Enter Yes or No]="Yes",-1,0).
Select Run and enter Yes or No at the prompt. Yes filters for True; No filters for False.

Filter with an unbound check box on a form
Use a check box instead of asking users to type Yes or No.
Work with exported Access data in WPS Spreadsheets
WPS Office is a free, lightweight alternative for everyday office work. Its familiar interface and Microsoft Office format support make it easy to move to WPS and review Access data exported to a spreadsheet. It does not fix or run Access parameter queries.

Frequently Asked Questions
Why does entering Yes return no records in my Access query?
A Yes/No field stores Boolean values rather than the text Yes or No. In the field's Criteria row in Query Design, convert the text prompt with IIf([Enter Yes or No]="Yes",-1,0).
What values represent True and False in Access?
Access represents True as -1 and False as 0. You can use those values in a query criterion for a Yes/No field.
How can I avoid asking users to type Yes or No?
Add an unbound check box to a form, then reference it in the query's Criteria row using Forms!formname!checkboxname. Keep the form open when you run the query.
Does setting a default value to False remove existing Null values?
No. A default applies to new records and does not change existing values. If a linked or other underlying data source permits Null, use Is Null in a query to find those records and handle them separately.




