D
Dennis A.
Using Access 2003:
I cannot seem to be able to use the <> operator in an IIF query criterion.
Why is that and what should I do instead?
Example: if a certain form has a checkbox labeled "Not New York" checked, I
want to select all records where State <> New York. If checkbox is not
checked, I want all records.
So I wrote: IIF(Form.Checkbox = Yes,<> “New Yorkâ€,[State]). The result is
fine if the Checkbox = No, but returns nothing if the Checkbox = Yes.
I can use <> “New York†alone and I get the right result and I can use
[State] alone and I get the right result, and I can make the fucntion work
without the <> (which is not what I want), but as soon as I use the <>, the
query returns nothing when the checkbox is checked.
I cannot seem to be able to use the <> operator in an IIF query criterion.
Why is that and what should I do instead?
Example: if a certain form has a checkbox labeled "Not New York" checked, I
want to select all records where State <> New York. If checkbox is not
checked, I want all records.
So I wrote: IIF(Form.Checkbox = Yes,<> “New Yorkâ€,[State]). The result is
fine if the Checkbox = No, but returns nothing if the Checkbox = Yes.
I can use <> “New York†alone and I get the right result and I can use
[State] alone and I get the right result, and I can make the fucntion work
without the <> (which is not what I want), but as soon as I use the <>, the
query returns nothing when the checkbox is checked.