HI All
I have a form called Add/Edit AFR, with a textbox called Text309.
I have a Query which is basically a mirror of my main table, but in field "FWO Number" I have this expression in the criteria:
IIf(IsNull([Forms]![Add/Edit AFR]![Text309]),"*","Like "*"" & [Forms]![Add/Edit AFR]![Text309] & "*")
However this doesn't seem to be working at all.
I used to have just: "Like "*"" & [Forms]![Add/Edit AFR]![Text309] & "*"
This one worked, however I noticed that it if Text309 was blank, it would the query would exclude all the records that didnt have an FWO Number (empty fields). This is not ideal if the Text309 is empty it should show every single record in the table.
So I tried the IIF expression above but now no matter what I put in Text309 nothing comes up at all.
If should be checking if Text309 is blank, if blank it should be putting "*" into the criteria which would bring up ever record (or so I'm told), if its not blank then it should be performing the Like *Text309.Value* criteria.
Any ideas?
Thanks