Limits are reached - if I open one more form: Error 3048: Cannot open any more databases
I have 2 reports and 1 form open. Each of theses has complex data sources (with many joins, subqueries...). If I open an fourth report - I get the error message.
I think the limits are to low. Please upgrade them.
Pat Hartman commented
Your database is probably corrupted. Start with compact & repair. If that doesn't work, try rebuilding by starting a new, empty database and importing all objects. Don't forget to reset the back page settings if needed.
to test the problem, run the function with an open table
then with others ...
Public Function MaxOpenDatabase(Optional plngLevel As Integer = 1) As Integer
Dim db As DAO.Database
On Error GoTo ErrorHandler
Set db = CurrentDb()
' Appel récursif
plngLevel = MaxOpenDatabase(plngLevel + 1)
' Sort de récursivité
Set db = Nothing
MaxOpenDatabase = plngLevel
If Err.Number = 3048 Then
' Cannot open any more databases.
ElseIf Err.Number = 3014 Then
' Cannot open any more tables.