Unanswered: multiple parameter criteria in queries
i have a query (in my database) and it has multiple parameter criteria in it, there are 7 in total. WHat i would like to do is create a form that will allow the user to input all the criteria at once in the form, hit the ok button and send all the inputs to the query and then open up a report based on the entered values.
I have done this before, but the problem was you had to enter a value into each parameter, you couldnt miss 1 or 2 out. This is a slight problem, because i do not want to always enter values in all of the parameter criteria's. Is there anyway to get around this or solve my problem. An online tutorial or step by step guide would be very very good, or just point me in the right direction.
ps. im not a database genious, so go easy on the technical wording lol.
set up your criteriaBoxes on a form and visible = false them
set up a secondSetOfBoxes for the user to play with.
on goFind_click visit each of your secondSetOfBoxes and set the value of the corresponding criteriaBoxes to:
iif(isnull(thisbox.value), "*", "*" & thisBox.value & "*")
tie your query criteria to:
...and you gain sub-string search for each of your criteria.
...and you lose a lot of time in a humungous database.
it works fine for me in my typical 50k-record db without too much time penalty(milliseconds on a PIII-333), but on a mega-record db the like will slow you down too much so use iif(isnull(thisbox.value), "*", thisBox.value) and drop the LIKE