Sharepoint Filters (Ignore empty criteria)

Mar 9, 2010 at 4:05 AM

I have a search form in sharepoint containin multiple textboxes to allow the user to input one or different combinations of search criteria. Right now the problem I'm having is if I want to input search let's say using one criteria, it will return no results since sharepoint evaluate all the other blank text boxes as criteria also i.e. it's also searching the list for records fitting all the criteria including the empty ones. How can I make it as such that sharepoint ignores those criteria that hasn't been inputted BUT taking in consideration that the user can still search for blanks if he wants to. Any suggestion? Thanks