D
Dirk Goldgar
mariobro said:ok now were talking although i don't quite understnad all of it, so
here are parts of the code:
Public cnn As ADODB.Connection
Set cnn = New ADODB.Connection
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\AppData\AppData.MDB;"
the above code is part of what it runs when the application opens.
the following code is what i use to open the tables
Dim rst As ADODB.Recordset
On Error GoTo HandleErrors
Set rst = New ADODB.Recordset
rst.Open "Select * from tblLocations WHERE ID = " & Me.ID, cnn, &
adOpenKeyset, adLockPessimistic
in response to your second point all the tables in the application
mdb are linked to the data mdb. The tables are not the recordsources
for the forms, they are the recordsources for the combo boxes though.
and yes all the forms are unbound.
how can i use a global connection object.
You *are* using a global Connection object. You said "connection
string" before, which is not the same thing at all, but I see from the
code you posted above that you are actually creating and opening a
Connection object. So that concern is dealt with, leaving us with the
fact that you and Access aren't using the same connection to the
back-end database.
Did you try "DBEngine.Idle dbRefreshCache" yet? Any effect?
You didn't answer my last question: why? Why do it this elaborate and
cumbersome way? Why don't you want to work with the linked tables?
Answers to these questions would really help me to advise you,
especially since we're moving into an area where I have little
knowledge, just manuals and help files to go on. I know DAO pretty
well, ADO only slightly. If your back-end database is an MDB file, why
use ADO at all? DAO would be more efficient. Are you using ADO in
anticipation of shifting the back-end to SQL Server or some other
client-server database? Jet and DAO do a pretty good job at handling
linked ODBC tables.
I'm signing off for the night. Maybe more information will make better
sense of the whole thing, in the morning.