Query on certain fields, but not all

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

Guest

There is probably a simple answer for this, but I have a form set up with 3
text boxes and a run-query button. For the query to return results, you need
to fill in a value in each of the 3 fields. I would like to get it to where
only 1 of the fields is required and the other 2 are optional to query for
more specific information. Can anyone assist me in setting this up?

Thanks,
Todd
 
Here is the example from a Criteria cell in a stored query that may give you
some ideas. Basically, if the control on the form has no entry, it will not
filter on the column, but if it has an entry, it will filter on that entry.
You just need the same sort of logic for each of the fields on which you are
filtering.

Like
IIf(IsNull([Forms]![WorkFlowMgr]![cboClient]),"*",[Forms]![WorkFlowMgr]![cboClient])
 

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