Robert Smith said:
I have a field that I want to query. The input is Yes or No. I'm trying to
find an Iif statement that will do it.
1. In query design view, enter the prompt you want into the Criteria row
under your yes/no field. Put the name in square brackets, e.g.:
[TrueOrFalse]
2. Inform Access that this is a true/false value. Choose Parameters on the
Query menu, and enter this row in the dialog:
[TrueOrFalse] Yes/No
The query will now prompt you for the value, and accept only true or false
values. The user can enter No, False or 0, or Yes, True, or -1.
You will end up with a query that shows something like this in SQL View:
PARAMETERS [TrueOrFalse] Bit;
SELECT MyTable.MyYesNo
FROM MyTable
WHERE MyTable.MyYesNo = [TrueOrFalse];