Jason Brady
Jason Brady

Reputation: 1728

Run-Time error '3048' happening even though I close connections

I've been getting an error that I've never seen before. I keep seeing this:

Run-time error '3048':

Cannot open any more databases.

Having Googled it, it seems this happens when there are very complicated forms that have lots of lists or combo boxes that have their sources as a table/query. However, I've not changed these forms for a while now and I'm all of a sudden seeing this. Plus, my forms really aren't that complicated, usually just a single list and maybe 1 or 2 combo boxes. I just started seeing this error yesterday (2/2/22)

Almost in all cases I'm accessing the tables by using this code:

Dim rst As Recordset: Set rst = CurrentDb.OpenRecordset("table name or SQL statement")

Then I'll access data using something like, whether it be AddNew, Edit, or just looping through a recordset.

With rst
    .AddNew
    .Fields("name") = "Value"
End With

OR

Do Until rst.EOF
    'Do something
    .MoveNext
Loop

And I've already double checked that every time I open a recordset I close it

rst.Close
Set rst = Nothing

However, I keep seeing that error now. Is there some other way that I'm supposed to close these recordsets that properly closes the connection? I'm guessing opening these is causing something to linger that I'm not aware of.

the only solution I have right now is to completely restart my PC and then I can use it for a bit before I see the error again.

Thanks for your help!

EDIT: When I get that error, I can't even close everything in Access and manually open a table to look at it. I get this error message

Reserved error (-1104); there is no message for this error.

Upvotes: 1

Views: 416

Answers (3)

Alice Cooper
Alice Cooper

Reputation: 1

When opening a database of an earlier version (.mdb format) in Microsoft Access version 2013 or later, you may encounter an error ‘Cannot open a database created with a previous version of your application.’

You can fix the error by converting the old database file format (.mdb) to the .accdb file format.

To work around this, Microsoft recommends opening the Access database (MDB) in Access 2007 or later versions, and then saving it in the file format you can open in Access version 2013 or higher.

Follow the below link to perform the steps to convert the .mdb file to .accdb file format:

https://support.microsoft.com/en-us/office/convert-a-database-to-the-accdb-file-format-098ddd31-5f84-4e89-8f44-db0cf7c11acd#

Best Regards,

Alice

Upvotes: 0

Kees Dapperens
Kees Dapperens

Reputation: 131

I also got these problems after updating Office 365 tot the latest version (221, build 14827.20158). When I close the Access application and reopen it, I immediately get the error. Then I first have to resatart my computer in order to have the application working until it reaches the max amount of conections.

Upvotes: 0

Gustav
Gustav

Reputation: 55906

This is, sadly, a known current bug:

Access doesn't close properly. A remaining background process can only be terminated in task manager

There is no official info or remedy yet.

Upvotes: 2

Related Questions