cannot open any more databases (expert Q)

J

John Henriksen

Hey group

Got this problem, having to many table id's open at one time

I have a frontend / backend system . and lot of forms/tables open at one
time.

need to know how to free table id's.

I got a main form with subforms linked in it. and I did try to remove the
source by programming. but I dont think that access are freeing up the table
id.

There is no table open I do remember to close all recordsets and freeing the
pointer. eg

dim db as dao.database
dim rst as dao.recordset

set db = currentdb
set rst = db.openrecordset("sometable",dbopendynaset)
.....bla bla
.... bla bla
rst.close
db.close
set rst = nothing
set db = nothing

and so fourth

and freeing some source form subforms like

' LejlighedHoved = subform control name on the main form

Me.LejlighedHoved.SourceObject = ""
Me.LejlighedHoved.LinkChildFields = ""
Me.LejlighedHoved.LinkMasterFields = ""

and setting them again

Me.LejlighedHoved.SourceObject = "frm_Lejlighed"
Me.LejlighedHoved.LinkChildFields = "ForeningsNr"
Me.LejlighedHoved.LinkMasterFields = "ForeningsNr"

how can I do this better can anyone help me

John
 
T

TC

Are you sure you don't have an endless loop in your code? The last time this
error happened to me, I had a data value that caused an endless loop in the
code. The code kept going, opening further recordsets, until it failed with
that error.

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top