R
rb608
I want to filter records in a simple query, but based on the contents on a
text box in a form. However, I want to use the criteria only if the text
box is not null. The query works fine when there is data in the text box;
but I'm having trouble returning all of the records when the text box is
blank.
I thought this would work, but it doesn't:
IIF(IsNull([Forms]![DataForm]![txtLevel]) = True,
[Forms]![DataForm]![txtLevel], Like "*")
In place of the Like "*" part (or the entire statement) what can I use to
have the query return all records in the case of a null value text box?
TIA,
Joe
text box in a form. However, I want to use the criteria only if the text
box is not null. The query works fine when there is data in the text box;
but I'm having trouble returning all of the records when the text box is
blank.
I thought this would work, but it doesn't:
IIF(IsNull([Forms]![DataForm]![txtLevel]) = True,
[Forms]![DataForm]![txtLevel], Like "*")
In place of the Like "*" part (or the entire statement) what can I use to
have the query return all records in the case of a null value text box?
TIA,
Joe