Cheesewoman
Registered User.
- Local time
- Today, 20:02
- Joined
- Nov 28, 2014
- Messages
- 11
I have been building an Access Database (2010) at work for a good few months now (on and off), and I have tried my best to keep to best practices where possible. It currently has;
16 Tables (split into a back end database, and linked to the front end database)
13 Queries, none of which are that complex, 8 of which run before the database is even loaded for use.
7 Forms, 3 of which are subforms on the main form (again, none of these forms are complex by any means, a couple of buttons, list box, a few text boxes etc).
4 Reports which all run from queries (with modified filters through VBA).
It was all working fine until I added the reports, and since then whenever I try to use the main form, after tabbing onto a particular textbox triggering the code below (note that I use temp tables as I have some behind the scenes binding going on here) it always breaks and throws the 3048 error "Cannot open any more databases":
I have attempted to look this up on google and follow other people's fixes, but to no avail.
My understanding of this is that I have too many connections open, be it through queries, tables, forms controls etc. at the same time.
So I have gone through and made absolutely sure that I have closed and cleaned up all of my database connections, recordsets etc. Nothing is left open, and there are no infinite loops. In fact the code hasn't changed at all for the forms (apart from the report form, which doesn't trigger this issue) from before I put the reports in.
I was running each report through it's own form before, and I've now condensed that down to one form for all 4 reports, which actually makes it a lot simpler.
Despite my efforts I am still getting this very annoying and difficult to debug error.
You guys have helped me out a lot in the past and I'm hoping you can do so again today please!
I think I might lose all of my hair by the end of today if I don't get this fixed :banghead:
16 Tables (split into a back end database, and linked to the front end database)
13 Queries, none of which are that complex, 8 of which run before the database is even loaded for use.
7 Forms, 3 of which are subforms on the main form (again, none of these forms are complex by any means, a couple of buttons, list box, a few text boxes etc).
4 Reports which all run from queries (with modified filters through VBA).
It was all working fine until I added the reports, and since then whenever I try to use the main form, after tabbing onto a particular textbox triggering the code below (note that I use temp tables as I have some behind the scenes binding going on here) it always breaks and throws the 3048 error "Cannot open any more databases":
Code:
Dim rs As Recordset
Set rs = db.OpenRecordset("SELECT * FROM BatchTemp")
I have attempted to look this up on google and follow other people's fixes, but to no avail.
My understanding of this is that I have too many connections open, be it through queries, tables, forms controls etc. at the same time.
So I have gone through and made absolutely sure that I have closed and cleaned up all of my database connections, recordsets etc. Nothing is left open, and there are no infinite loops. In fact the code hasn't changed at all for the forms (apart from the report form, which doesn't trigger this issue) from before I put the reports in.
I was running each report through it's own form before, and I've now condensed that down to one form for all 4 reports, which actually makes it a lot simpler.
Despite my efforts I am still getting this very annoying and difficult to debug error.
You guys have helped me out a lot in the past and I'm hoping you can do so again today please!

I think I might lose all of my hair by the end of today if I don't get this fixed :banghead: