I have a form that calls a query and passes a textbox value to be evaluated in an IIF statement. The textbox value default value is the word blah.
The IIF statement looks something like this:
IIF ([Forms]![Form1]![txtbox1]="blah", NULL, [Forms]![Form1]![txtbox1])
The logic is that if the user did not enter anything in the text box the condition will be true and the query will be passed NULL which is nothing. That will result in all of the records being shown for that column (which is what I'm trying to achieve!)
The problem is this. The NULL value for the True part of the IIF Function is invalid. I've tried double quotes "", putting nothing in there, LIKE *, IS NOT NULL, and a host of other things but nothing seems to equal a blank value.
I want the truepart of the expression to be nothing (blank). Is that possible?
The IIF statement looks something like this:
IIF ([Forms]![Form1]![txtbox1]="blah", NULL, [Forms]![Form1]![txtbox1])
The logic is that if the user did not enter anything in the text box the condition will be true and the query will be passed NULL which is nothing. That will result in all of the records being shown for that column (which is what I'm trying to achieve!)
The problem is this. The NULL value for the True part of the IIF Function is invalid. I've tried double quotes "", putting nothing in there, LIKE *, IS NOT NULL, and a host of other things but nothing seems to equal a blank value.
I want the truepart of the expression to be nothing (blank). Is that possible?