this might seem an easy question but I can't figure it out. I have a table with a number of fields. 3 of them (SizeA, SizeB, SizeC) are numbers and I have a form which uses a query to query the table. Now, Size A is always not null, but SizeB and C can be null. This is the criteria I use for sizeA, B and C:
Like IIf([forms]![Search Fittings]![SizeA_Text]="0","*",[forms]![Search Fittings]![SizeA_Text])
Like IIf([forms]![Search Fittings]![SizeB_Text]="0","*",[forms]![Search Fittings]![SizeB_Text])
Like IIf([forms]![Search Fittings]![SizeC_Text]="0","*",[forms]![Search Fittings]![SizeC_Text])
As you can see, the if checks whether the form field Size*_Text is equal to 0 or not. The problem is that the table entries with SizeB or SizeC not set (so they are null) do NOT show up in the search. The solution might look like the following:
Like IIf([forms]![Search Fittings]![SizeC_Text]="0",Like "*" Or Is Null,[forms]![Search Fittings]![SizeC_Text])
but it doesn't work. do you have any suggestion on how I can realize this logic?
Thank you, Guido
Ps: I found this:
http://www.dbforums.com/showthread.p...uot-left-blank
I tried:
WHERE (MyField = Forms!MyForm!MyCombo or Forms!MyForm!MyCombo IS NULL)
but I get an error about WHERE does not exists, I guess it is for older Access versions.