Cannot open more databases

mrlw00r

Researcher
Local time
Today, 18:40
Joined
May 24, 2003
Messages
24
Cannot open more databases - arghh!

Hi there
A couple of days ago I split my project into the database backend and forms front end, and today whenever I open my main form (and others for that matter) I get told that I "Cannot open any more databases"
This seems a bit odd to me since just opening the forms doesn't invoke any code that will open new connections, and besides, I don't ever create new connections - I just point to CurrentProject.connection.
This is very worrying for me since I have to deliver the product on Tuesday and I was just cleaning a handful of things up in preparation for finalising the application!!
Help!!!
Mike
 
Had a thought about this - could it be down to the number of subforms I have? I have three tabs which contain one main subform each, so in total I've got around 30 forms coming off the main one.
Is that too many? How might I go about doing a quick redesign to get around this. I like the tabs...!! :)
 
mwlr,

The only thing that I have heard with reference to this is
that you might have a circular reference. That could be
a subform (or subreport) calling its parent, which in turn
calls the subform ...

Or it might be a query that is based on a query that is
based on the original.

What did you change last?

Wayne
 
That's what this person found:
http://dbforums.com/arch/201/2003/1/645495
But no, I'm pretty sure there're no circular ref's going on. For the moment I've put the tables back with the forms and its ok.
I then found this thread (which was at the top of a google query for "access error 3048" which I missed earlier!):
http://dbforums.com/t588004.html
Which explains the problem nicely.
It would appear that Access can create more of these table-ids if the current database is in the same project as the forms.
The solution - redesign my blimmin' app. DOH!
Are there any guidelines as to the maximum number of reports on a form? I don't recall seeing any anywhere! I know there's a limit to sub-form depth, but mine only goes to 4.
Would disabling/enabling the forms as I move between tabs work? Or could I open/close them in some manner? That would solve the problem quite nicely.
 
Where I said "maximum number of reports on a form" I really meant maximum queries - anything which requires one of these table-id's to be open.
 
mwlr,

How many linked tables do you reference? This seems to
be rather constraining.

When did you add the fourth level of sub-form, I thought
that the max was three.

I'll check.

Wayne
 
Thanks all, that's a great help.
The solution to my problem is to only assign a recordsource to the top level (big) forms when they are to be viewed. This can be done through the onclick event of the tab page, so each tab will kill the recordsource's for the other tabs, and set it's own when selected.
I assume that removing the recordsource for a form will then release the table-ids. hmmm. Will find out soon I guess...!
 
I've started trying to reorganise my forms so that things will work better, and I thought I'd manage to fix the problem by setting/clearing recordsources when changing tabs.
When I tried running the database onsite - when it had been installed - I started getting the error again, and so I had to unlink the tables and put everything back into one mdb file again. This isn't very good because I need to be able to email updated front-ends when ready.
I've now started some thinking, and drew up a quick spreadsheet that allows me to calculate the tables open (might make it available at some point), which tots up the tables open for all queries, tables and forms. My biggest form only has a total of 112 - which is really not much, 20 times less than the Jet 4.x limit of 2048 (I think that's right). OK so my spreadsheet might be wrong, but...
My code is pretty clean, and all recordsets are closed (not all local objects are set to nothing at the end of functions, but they're local so they get removed at the end of the function, right?) so I'm sure it's not that...
Since the database works when the tables are in the same file as the forms I'm guessing the problem isn't a circular reference, and I can't find any.
If anyone has any ideas, or would be willing to take a quick look at the database (I'm not prepared to make it publicly available...) I would be most grateful!

Mike 'In a bit of a panic now'
 
Error 3048 - "Can't open any more databases"
Had a problem with a Access 97 split db that did not occur when it wasn't split. A form with a subform would not work and I had to redesign the form to find another way to work.

I am not sure if this is version specific or not. It sounds like it has more to do with how Jet works.
 

Users who are viewing this thread

Back
Top Bottom