Advanced Search
-
Hi guys I've a form for cars search. There are different text boxes and check boxes on that form. User can even enter one field or all the field or no one field. If i use and operator then it doesen't give me any result. can anybody help me. How can i make a query that can give me result. for example i want to search the cars which have cdplayer. now all the fields are empty only one check box is checked.
-
Hi guys I've a form for cars search. There are different text boxes and check boxes on that form. User can even enter one field or all the field or no one field. If i use and operator then it doesen't give me any result. can anybody help me. How can i make a query that can give me result. for example i want to search the cars which have cdplayer. now all the fields are empty only one check box is checked.
How are you performing your search? Are you using a stored procedure? If so you will need to allow your parameters to be null. Pass all of your fields on the form to your search proc. If one of the fields is blank pass a null value for that parameter. This way you can do a specific search on only the criteria that is selected by the user. I have also done a search page that will allow the user to select Any in a drop down list. The proc then replaces a parameter with the value Any with a * (to search all items in the drop down list). Hope this helps. Nathan