This is where you start getting into it now...
How many criteria (criterium?) do you have?
Maybe a form for the user to enter the data on would be preferable, then they wont have to keep entering data into the little dialog boxes.
You can reference the fields on a form in the same way as you are with the [Type the phrase of letters you are looking for:], you are currently using.
The format is:
Forms!<formName>!<formControl>
So, if you have a form named: frmSearch
And on that form you have a textbox named: txtProjectName
You would use: Forms!frmSearch!txtProjectName in your query.
So, you need to open the form first and then enter the data in the text box and then run the query.
You could, I suppose, then run 20 queries (against each of your tables) with all of the queries pointing tot he same textbox - I still suggest you combine all your data though!
The way to get around the user not putting any data in the textbox and still wanting the query to show the results is to put the following, though this may start confusing you:
Forms!frmSearch!txtProjectName or Like Forms!frmSearch!txtProjectName is null
It needs both parts of the statements, including the or and the like and the is null!
Food for thought, and I am skimming over so much, I think you should invest in a book... I'm not on commission!
|