Limit search

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a form that I use for searching. It takes all the records in the
database and then people can type things they are searching for - numbers,
dates, names, descriptions etc. - into a text box, and as they type, the
selection window shows fewer and fewer matches.
What I would like to do now is give the user the option to limit where the
underlying query searches, but only if he wants to do this.
In other words, I want to be able to search the entire database [default],
or only within a certain year, or amongst the products of one manufacturer,
or a certain model etc. and I want to be able to combine parameters so that
more than one can be applied at the same time.
I have 5 or 6 parameters and I was thinking of using drop-down boxes for the
user to select a value for these parameters.

My problem is that when I specify parameters to limit the search, I have to
have a value in all of them. What do I need to do to make those optional?

Thank you.
 
I do something very similar to this. I dynamically build a string then place
the string in the filter field when the user pushes a button.
[Form_FormName Subform].Filter = strQuery
[Form_FormName Subform].FilterOn = True
This allows me to use info in dropdown boxes or other fields to make
programmatic decisions.

You didn't say how you are accomplishing your process, so don't know if this
method is compatible with yours.
James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top