Query iff help

sysop470

Registered User.
Local time
Today, 05:37
Joined
Mar 25, 2005
Messages
87
I have two fields which i need to search neither with MAIN CATEGORY(field1) or with MAIN CATEGORY(field1) AND SUB CATEGORY(field2) together. These are both COMBO BOXES.

My problem is what shound i put in the criteria of the SUB CATEGORY to search neither if sub category is empty either search with MAIN CATEGORY and SUB CATEGORY.

I have used the iff function

Like IIf([Forms]![Form - Search By Sub Category ]![Sub Category] Is Null,"*",[Forms]![Form - Search By Sub Category ]![Sub Category] & "*")

It works but it does not give me the exact result beacuse i think of the wildcard..

Any help please??
Thanks
 

Users who are viewing this thread

Back
Top Bottom