I created in the criteria field of a query an conditional statement that should give as result "all entries allowed" when the form field (combobox c1) I refer to is isnull
SELECT Tbl_dara_test.product
FROM Tbl_dara_test
WHERE (((Tbl_dara_test.product)=IIf(IsNull([Forms]![f1]![c1]),(Tbl_dara_test.product) Like "*",[Forms]![f1]![c1])));
The - like "*" - is not working.
I tried also "*", "" and the same negative result
While if I create a text box (t1) in the form with a function =IIf(IsNull([c1]),"*",[c1]) and use in the query
SELECT Tbl_dara_test.product
FROM Tbl_dara_test
WHERE (((Tbl_dara_test.product) Like ([Forms]![f1]![t1])));
It works!!
Creating in the from an extra text field seems to me a dirty solution.
Is there a possibility to create a funtion in the query only?