01-28-2010, 04:33 PM
So, I have this database, and I want to give the user a form to search by all or some of the fields. The fields on the form are of a variety of types (checkboxes, dropdown boxes, etc). What I want is the ability for the user to setup search criteria and then have it be saved to the database (possibly in the form of a query) and then of course, they will have the ability to edit their saved search (which would turn the query back into the form elements they picked/didn't pick). I hope that makes sense. I'm sure this has been done 1,000's of times if not more. I'm looking for suggestions as to the most efficient way to do this. I can make a large amount of IF's etc and build the query.. and then write code to turn it back. but I'm thinking some type of loop or something would be better so that I'm not hard-coding each option?