query criteria

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

Guest

I have several values I would like the queries to display, however i have run
out of space in the criteria entry boxes. Is there a way to expand selection
OR leave out certain criteria.
 
Tell us more of what you are doing.

The WHERE clause of a query can handle 99 AND/OR phrases in the latest
version of Access - much more than the graphical query window can display -
so you can always go directly into the SQL if needed. You may even finish up
with a much more efficient SQL statement by doing it that way (since the
graphical window repeats the necessary ANDs for each OR.)

Or perhaps you are trying cope with parameters that may be null, so you are
typing criteria such as:
[Enter a Date] Is Null OR [SomeDateField] = [Enter a Date]
If that is what you are doing, it might be more efficient to build the WHERE
clause dynamically in a form, from only the boxes that have a value. There
is a basic example of building the WhereCondition for OpenReport in Method 2
of this article:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

There is a more comprehensive example of building the Filter string for a
search form in this download:
http://allenbrowne.com/unlinked/Search2000.zip
The example works with Access 2000 and later.
 
Back
Top