criteria expands after I save it

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

Guest

I enter criteria with "or"'s and "and"'s, everything works fine when I run
it. I save it and go back to design mode and for some reason my criteria has
been split up according to my "Or" statements into like 20 lines of criteria
when I started with 2. The Query still runs fine but when I make any changes
and try to run the query, I receive the message "query too complex". I have
been trying to find where I can turn this option off that expands my criteria
but with no luck. Any assistance would be appreciated.
 
Unfortunately, there's no such option. The only way to prevent Access from
messing with your hand-crafted SQL is to never open that query in design
view.
 
Like Brendan wrote, when you use the QueryGrid, Access will interpret from
the Query to the SQL statement (the important bit of the saved Query).

In some cases, you may be able to use the In operator instead of Or to
shorten your SQL String and Access will also leave your In-operator
expression alone.

Check Access Help (the JET Reference section) for the In operator (and not
the In clause).
 
Back
Top