query is too complicated

0

00KobeBrian

Hi,

I try to run a query and I get an error message "query is too
complex" and not running in access 97. Can anyone please help ? Thanks.
 
D

Duane Hookom

If I had an error message like this and I wanted help, I would try to
provide enough information for others to help me. Is there anything you can
provide for us that might allow someone to provide assistance?
 
0

00KobeBrian

In fact, I just found out that there is a limit on the number of criteria in
a query, right? If I pass over the maximum, say field 1 = a or b or c....
until maximum in query, is there a workaround? Thanks.
 
D

Duane Hookom

Why don't you just provide your SQL view and tell us what you are attempting
to accomplish?
 
J

John Vinson

In fact, I just found out that there is a limit on the number of criteria in
a query, right? If I pass over the maximum, say field 1 = a or b or c....
until maximum in query, is there a workaround? Thanks.

Several. The WHERE clause as written will not work anyway!

First try a criterion of

IN ("A", "B", "C", ...)

That will get you some savings (the QTC error arises when the compiled
query exceeds 64KBytes, and each OR clause contributes some).

A better solution might be to put the criteria as records in another
table and use a JOIN, joining Field1 to the field containing the
criteria.

John W. Vinson[MVP]
 
D

David F Cox

This message sometimes occurs because the query is just plain wrong, and
Access gets confused. Provided it is not a query that changes anything just
experimenting by removing bits and putting them back may enable you to spot
the error, otherwise post the SQL for us to look at.
 

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

Top