How can Access 97 define an ADO connection to the current database

L

leonard webel

Hi,

Access 2000 can define an ADO connection to the current database as
Set cn = Application.CurrentProject.Connection

Access 97 can define the current database for DAO as
Set dbs = CurrentDb


BUT How can Access 97 define an ADO connection to the current database



Please help

Thanks
 
S

Stefan Hoffmann

hi Leonard,

leonard said:
BUT How can Access 97 define an ADO connection to the current database
Why would you do that?

btw, ADO was first delivered with Access 2000. You may use
CreateObject() to create ADODB objects:

Dim cn As Object
Set cn = CreateObject("ADODB.Connection")
cn.Open("Driver={Microsoft Access Driver " & _
"(*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;")

mfG
--> stefan <--
 
Top