G
Guest
I have a form with a series of check boxes; the values of the controls are
used as conditional criteria in a query. So if checkbox 2 is checked its
value is true.
In the criteria row of the query grid for field [Category] I have entered
IIF(Forms!MyForm!Checkbox2=True,"X") then all records with Category of X are
returned. This works fine.
If the user checks Checkbox 1 all records should be returned so I have tried:
Iif(Forms!MyForm!Checkbox1=True,"*") also tried Like
Iif(Forms!MyForm!Checkbox1=True,"*")
but neither work. From investigation it looks as if the value of the
checkbox is used i.e. -1 (have tried it out on a field where -1 is a valid
entry.
I also need to use similar criteria to select records where their values are
Null or Is Not Null but I can't get this to work either - just entering Null
or Is Not Null in the criteria is fine its when they are included in the Iif
statement that they fail.
Grateful for any help.
used as conditional criteria in a query. So if checkbox 2 is checked its
value is true.
In the criteria row of the query grid for field [Category] I have entered
IIF(Forms!MyForm!Checkbox2=True,"X") then all records with Category of X are
returned. This works fine.
If the user checks Checkbox 1 all records should be returned so I have tried:
Iif(Forms!MyForm!Checkbox1=True,"*") also tried Like
Iif(Forms!MyForm!Checkbox1=True,"*")
but neither work. From investigation it looks as if the value of the
checkbox is used i.e. -1 (have tried it out on a field where -1 is a valid
entry.
I also need to use similar criteria to select records where their values are
Null or Is Not Null but I can't get this to work either - just entering Null
or Is Not Null in the criteria is fine its when they are included in the Iif
statement that they fail.
Grateful for any help.