Can multiple sub-forms be the cause of Error 3048?

AFrost

New member
Local time
Today, 05:26
Joined
May 11, 2011
Messages
4
Hello all,
I am using an Access 2007 front end linked to an Access 2007 back end.

I have a Report that the user operates by selecting the information he/she wants to see on a pop-up form and clicking a button. The Report works perfectly unless another form, called Shows Form, in the database is opened. When Shows Form is open the Report/button on the pop up form generates Error 3048: Cannot Open Any More Databases. Also when Shows Form in open, the Query that the Report calls on also won't run. The Query gives gives the same error - Cannot Open Any More Databases. :banghead:

I have been through my code with a fine tooth comb to make sure all DAO.Recordsets and DAO.Databases are closed after they are used.

The troublemaker Shows Form is quite complex and has many sub-forms (11), on a tab control (9 tabs). The Shows Form is the work horse of the database and the User needs to have this form open all of the time. It is inconvenient to have to close the Shows Form in order to use the Report. I am suspecting, through my internet reading, that the multiple sub-forms in the Show Form are using up resources and causing Error 3048.

Does anyone have any thoughts on this? I thought maybe I could look at coding the sub-forms to open only when needed - when the user clicks on the tab containing the sub-form. Would that conserve resources? Does anyone have a resource with an example of that that I could look at?

Any other ideas of what is causing this error would be appreciated.

Thanks to all who have taken the time to read this!
 
Hello all,
I am using an Access 2007 front end linked to an Access 2007 back end.

I have a Report that the user operates by selecting the information he/she wants to see on a pop-up form and clicking a button. The Report works perfectly unless another form, called Shows Form, in the database is opened. When Shows Form is open the Report/button on the pop up form generates Error 3048: Cannot Open Any More Databases. Also when Shows Form in open, the Query that the Report calls on also won't run. The Query gives gives the same error - Cannot Open Any More Databases. :banghead:

I have been through my code with a fine tooth comb to make sure all DAO.Recordsets and DAO.Databases are closed after they are used.

The troublemaker Shows Form is quite complex and has many sub-forms (11), on a tab control (9 tabs). The Shows Form is the work horse of the database and the User needs to have this form open all of the time. It is inconvenient to have to close the Shows Form in order to use the Report. I am suspecting, through my internet reading, that the multiple sub-forms in the Show Form are using up resources and causing Error 3048.

Does anyone have any thoughts on this? I thought maybe I could look at coding the sub-forms to open only when needed - when the user clicks on the tab containing the sub-form. Would that conserve resources? Does anyone have a resource with an example of that that I could look at?

Any other ideas of what is causing this error would be appreciated.

Thanks to all who have taken the time to read this!

ONE THOUGHT:

You said that you closed all open database Instances when they were no longer needed. Did you also remove them from memory by defining them as Nothing?

Dim MyDB AS Database
Set MyDB = CurrentDb
.
{Do Something with MyDB}
.
MyDB.Close
Set MyDB = Nothing

-- Rookie
 
ONE THOUGHT:

You said that you closed all open database Instances when they were no longer needed. Did you also remove them from memory by defining them as Nothing?

Dim MyDB AS Database
Set MyDB = CurrentDb
.
{Do Something with MyDB}
.
MyDB.Close
Set MyDB = Nothing

-- Rookie

Indeed, I have closed them and removed them from memory using the code you have put above.

I dearly wish this was the answer to my problem but it doesn't seem to be....:(
 
Judging by that post, having lazy loading of forms/subforms might help too.[/QUOTE]

I think I have solved my problem using lazy loading of the sub-forms.

I have left the sub-form controls unbound and assigned the Sub-Form's Source Object only when the tab containing the sub-form is opened. I have also unloaded the sub-forms once the user leaves the tab.

For the first time in months I was able to run the Report with the Shows Form open.
Hooray for lazy-loading!
 

Users who are viewing this thread

Back
Top Bottom