R
RobertC
Guest
I am writing a program to be used on stand alone computers at different locations. Is there a simple way in Access 2000 to connect to the current database like there was in Access 97.
In Access 97, I was able to dimension the database and then use a simple:
Set dbs = CurrentDb()
to connect to a database to open a recordset.
In Access 2000 the only way I have been able to get it to work has been to use code like the following:
' Open a connection using the Microsoft Jet Provider.
Set cnntmp = New ADODB.Connection
cnntmp.Provider = "Microsoft.Jet.oledb.4.0"
cnntmp.Open "C:\DATA\DB\WellHistory.MDB", "admin", ""
This requires knowing the Jet engine version and the file location which I will not have control of when users install on their PC's.
Any help would be appreciated. Thanks in advance.
In Access 97, I was able to dimension the database and then use a simple:
Set dbs = CurrentDb()
to connect to a database to open a recordset.
In Access 2000 the only way I have been able to get it to work has been to use code like the following:
' Open a connection using the Microsoft Jet Provider.
Set cnntmp = New ADODB.Connection
cnntmp.Provider = "Microsoft.Jet.oledb.4.0"
cnntmp.Open "C:\DATA\DB\WellHistory.MDB", "admin", ""
This requires knowing the Jet engine version and the file location which I will not have control of when users install on their PC's.
Any help would be appreciated. Thanks in advance.