Complex queries may cause this error because they can use a lot of internal Access resources. Try to simplify your query to see if you can get it to run. Obviously, Group By clauses, Joins, Order By clauses, functions and various calculations add to the complexity and should be eliminated or simplified wherever possible. Unneeded columns should be removed from Select lists, Group By and Order By clauses.
You can try removing one element at a time to determine the cause of the error. For example, remove result set sorting or the order by clause. That is usually the easiest thing to do to begin with.
One common problem is the use of the Having clause to select records rather than the Where clause. Make sure that any selection criteria that is not based on aggregation occurs in a Where clause rather than a Having clause. That should help simplify the query. Terry
;-) The single biggest challenge to learning SQL programming is unlearning procedural programming. -Joe Celko
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.