A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Too many tables



 
 
Thread Tools Display Modes
  #1  
Old July 1st, 2008, 11:15 AM posted to microsoft.public.access.queries
Ian Belcher
external usenet poster
 
Posts: 4
Default Too many tables

Hi,
I have a query that uses several subqueries. If I run this query several
times I get the error of too many tables open. I don't have any tables open,
and I only have this one query open. The only way around it is to close down
the database and to start again. I'm thinking that for some reason the
subqueries are remaining in the memory somewhere and aren't being cleared.
It's frustrating because I have 150 reports based on the query which I
export to pdf (thanks Stephen Lebans - fantastic bit of code!) but I have to
restart the process every few reports.
Is this a known error, or am I doing something wrong?

Thanks

Ian
  #2  
Old July 2nd, 2008, 02:56 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Too many tables

Some guesses:

The data isn't normalized properly which requires some rather complicated
queries. I'm going to further assume that redesigning the database isn't a
viable option.

You might want to consider using temporary or 'work' tables to gather up
some of the data first. Run these make table or delete/append queries first
to gather up some of the data formerly gathered in the subqueries.

Another option would be to open the queries as a recordset in a function.
Then you could close the recordset and set it to Null. That should clear it
out of memory.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Ian Belcher" wrote:

Hi,
I have a query that uses several subqueries. If I run this query several
times I get the error of too many tables open. I don't have any tables open,
and I only have this one query open. The only way around it is to close down
the database and to start again. I'm thinking that for some reason the
subqueries are remaining in the memory somewhere and aren't being cleared.
It's frustrating because I have 150 reports based on the query which I
export to pdf (thanks Stephen Lebans - fantastic bit of code!) but I have to
restart the process every few reports.
Is this a known error, or am I doing something wrong?

Thanks

Ian

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.