Forum Discussion
Cannot Open any more databases
This message often occurs when Access has used up all available connections.
See my utility Available Connections which you can use to check the issue and from that work out what needs to be changed to solve your issues
- NeilClarkApr 23, 2021Copper Contributor
- NeilClarkApr 24, 2021Copper ContributorI have downloaded your Available Connections form and report and plugged them into the offending database and I can now see the connections dropping each time I open another form.
Previously, I have gone right through all of the code and made sure all objects and record-sets were closed and set to nothing when the form was closed. In fact, I can see that this seems to be the case, because when I open and close the forms now, the number of connections reverts to the previous level it was before opening them, so all items have been successfully closed.
The next question is; how do I further reduce the use of connections in my forms. I am obviously building my forms in a way that uses too many connections. How can I reduce that?- isladogsApr 24, 2021MVP
As you may already know, Access has a total of 255 available connections.
Each open object with a record source/row source consumes 1 or more connections.
If the number of available connections drops too far, the error message you are getting may occur.Closing recordsets after use is good practice and, as noted, this should allow Access to recover those connections.
However, your original post stated:
NeilClark wrote:
The system has a number of forms that need to be opened and stay open, so I have them all on large tab control so I can flip between the open forms easily. Most of the forms use combo drop-down boxes as part of the filtering; like a drop-down listing all the staff, so one can be chosen to look at their jobs. And many of the queries under the forms use dynamic lookups to get data from other related tables.Having all of these open at once is likely to be your issue. How many connections does all of this 'consume'?
Remember that subforms are loaded before the main form. So if you have a number of subforms on your tab control together with combos and dynamic lookups you are going to put Access under stress!
I suggest you only load each form as and when needed and close it when moving to another form / tab
OR only load the recordsource for each subform when it is activated. Similarly for your combos/ queries of possible. Then close each of these or clear the row source / record source when you move to another subform / tab
Hope that helps you move forward
- Harris_StFeb 04, 2022Copper Contributor
Hi, I am having a similar problems. Could I try your utility?
I tried to download but message stated that the page is not available
Thanks
Harris
- isladogsFeb 04, 2022MVP
Hi
Sorry about the broken link. My old http website is no longer in use
The utility is still available from my new website:https://www.isladogs.co.uk/available-connections
I've also fixed the earlier link
A lot of people have contacted me in the past couple of days about this utility and it can be very useful to diagnose issues.
However, in case you aren't aware, there is another major bug in the recent update to Office 365 - version 2201 build 14827.20158 - which is triggering the cannot open any more databases error.
There have been a very large number of forum posts on the issue around the world.
MS are aware of the issue but have not yet commented publicly on it AFAIAA
- Harris_StFeb 04, 2022Copper ContributorThank you very much!
Harris
- Feb 04, 2022
Hi,
If your version is M365 Current Channel version 2201 build 16.0.14827.20158 then you are most likely one of the victims of the latest update bug. In this case you should read one of the many existing discussion about it here, especially this one.
Servus
Karl
************
Access News
Access DevCon- Harris_StFeb 04, 2022Copper Contributor
Hi Karl,
Thanks for letting me/us know.
I have been tearing my hair out trying to understand what is happening.
At least I can now appreciate what is the cause for my teams databases falling over.
Regards,
Harris
- sgldjjSep 09, 2024Copper Contributor
Hi, I downloaded your utility and tried it out. Works great by the way! The issue I hope you can help me with is I'm losing 2 connections every 10 seconds with your form being the only thing open in the database. Is that normal? Or should I only be losing connections if I have an object, or objects, open that are linked to data in the tables? If I open your Available Connections database and open the form, it doesn't lose connections every 10 seconds. Only my databases are doing this (I've tried it out on a few other of my DB's). I'm nowhere close to an expert but I've used Access quite a bit over the years and I've never encountered this issue. I've checked and double checked that I'm not leaving any recordsets open (which I'm not - there's only a few instances in my code where I am opening a recordset and I close it and set it to Nothing each time) and I've tried compact and repair. Also, every time I close Access, the Record Locking Information icon stays... open? Not sure how to word it but I can't open Access back up until I open Task Manager and End Process. My form doesn't have any controls on it that are linked to any data in the database. The form has one button that runs code and when it runs, the connections drop by about 200 to 250 and when i close the form, the connections don't come back and they'll continue dropping by 2 every 10 seconds. Thanks in advance for any help you can offer! isladogs
- Sep 09, 2024
Hi,
You didn't mention your version and build number of Office. Therefore, one can only assume that the lost connections are being sucked up by a current Office/VBA bug. You can find details and the information about the planned fix in our documenting AFo article.
Servus
Karl
****************
Access Forever News DevCon
Access-Entwickler-Konferenz AEK - 19./20.10. Nürnberg- Sep 10, 2024
Hi,
Version 2408 build 17928.20156 with the fix for this new bug in Aug/Sep 2024 is now available in the Current Channel. You may have to select Update now in File - Account to get it immediately. Details can be found in our documenting article on AFo.
Servus
Karl
Access Forever News DevCon
Access-Entwickler-Konferenz AEK - 19./20.10. Nürnberg