error 3048 monitor resources in vba

  • Thread starter Thread starter carbra
  • Start date Start date
C

carbra

The error 3048 indicate to many open databases (recordsets) in an vba
project. Eventhough I have done the suggestions from Alex Dybenko with public
declare dbs as DAO.database at set dbs = currentDB in every subs I get the
error message.
Is there a way to monitor the resources in an application window so I know
when to stop building up objects in an project. I hope some one has an
suggestion. Thanks in adv.
 
Are you closing the recordsets (and uninstantiating the recordset variable)
each time you're finished with a lookup?
 
Dear Dennis,
The recordset is closing each time, but I do not "set dbs to nothing" each
time. Is that important?? My code is each time like the following with change
in table name.
'Dim dbs As DAO.Database declared as public elswere
Set dbs = CurrentDb
Dim rsCpr As Recordset
Set rsCpr = dbs.OpenRecordset("CPR", DB_OPEN_DYNASET)
rsCpr.AddNew
rsCpr!CPRnr = Me.CPR
rsCpr!Mod11ok = Mod11ok '*** checking ID
rsCpr!UserCreated = acbNetworkUserName
rsCpr!DateCreated = Now()
rsCpr.UpDate
rsCpr.Close
Is there a way to show available RAM for executing codes.
Thank for your comment, Dennis
 
Back
Top