OasisUnknown
New Member
- Joined
- Oct 15, 2015
- Messages
- 46
Hello All,
I am trying to filter a query based off a check box that is on my form.
the field I am trying to filter either has text values in them or they are null
What I am trying to accomplish is if the check box is not checked then just show me all the records. (basically don't filter anything and just show all. nulls and texts included.
when the check box is checked only show me null values and nothing with text in them.
in my field criteria I am trying something like
iif([Forms]![MyForm]![MyCheckbox] = 0, "*", Is Null)
but this is not working in any reguard but if I do a search for some text that is in there such as.
iif([Forms]![MyForm]![MyCheckbox] = 0, "myText", Is Null)
I will get an error because of the is null. it says the expression is to difficult to calculate.
but if I do
iif([Forms]![MyForm]![MyCheckbox] = 0, "myText", "myOtherText")
my query will flip back and forth between the fields with myText and myOtherText as expected.
I am not really sure what the best way to go about this is.
I am trying to filter a query based off a check box that is on my form.
the field I am trying to filter either has text values in them or they are null
What I am trying to accomplish is if the check box is not checked then just show me all the records. (basically don't filter anything and just show all. nulls and texts included.
when the check box is checked only show me null values and nothing with text in them.
in my field criteria I am trying something like
iif([Forms]![MyForm]![MyCheckbox] = 0, "*", Is Null)
but this is not working in any reguard but if I do a search for some text that is in there such as.
iif([Forms]![MyForm]![MyCheckbox] = 0, "myText", Is Null)
I will get an error because of the is null. it says the expression is to difficult to calculate.
but if I do
iif([Forms]![MyForm]![MyCheckbox] = 0, "myText", "myOtherText")
my query will flip back and forth between the fields with myText and myOtherText as expected.
I am not really sure what the best way to go about this is.