B
BruceM
I have been trying to set the criteria for a Yes/No field so that the user
can choose to see True, False, or both. The "both" part has me stumped. I
have tried variants of:
IIf([Yes or No or Both] = "Yes",True, _
IIf([Yes or No or Both] = "No",False, _
True or False))
Of course, the True or False does not work, since it seems to evaluate to
True. However, True or False as the only criteria gives me all of the
records.
In practice, for a report I would probably use an unbound form to select the
criteria, then build the record source at run time with no WHERE condition
for the Yes/No field if the user chooses to see both True and False. For a
form I would use a similar approach, except I would probably have the
criteria selections on the form itself rather than just when the form is
opened.
However, my question here is because I am trying to get to the root of the
logic behind the failure of the Both criterium.
can choose to see True, False, or both. The "both" part has me stumped. I
have tried variants of:
IIf([Yes or No or Both] = "Yes",True, _
IIf([Yes or No or Both] = "No",False, _
True or False))
Of course, the True or False does not work, since it seems to evaluate to
True. However, True or False as the only criteria gives me all of the
records.
In practice, for a report I would probably use an unbound form to select the
criteria, then build the record source at run time with no WHERE condition
for the Yes/No field if the user chooses to see both True and False. For a
form I would use a similar approach, except I would probably have the
criteria selections on the form itself rather than just when the form is
opened.
However, my question here is because I am trying to get to the root of the
logic behind the failure of the Both criterium.