I am writing an application in which the user's frontend is in Microsoft Outlook 2003 and the backend is in Access '97. From my understanding, Access '97 uses DAO and Outlook 2003 uses ADO so when I am trying to make a recordset and connection I have been using DAO. However when I try to run my code I get the error message "Method or Data Member Not Found" and it highlights ".Connection" from the line "Set cn = DAO.Connection." I have posted my code for making a connection below. I would appreciate any help anyone would be able to give me.
stdbName = "C:\Programming\SelfServeTestSchedule.mdb"
Dim stSQL As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = DBEngine.Workspaces(0).Databases(0)
Dim cn As DAO.Connection
Set cn = DAO.Connection
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open stdbName
stSQL1 = "SELECT initials FROM UserDataTable"
Set rs = db.OpenRecordset(stSQL1, dbOpenDynaset)
-Eric
stdbName = "C:\Programming\SelfServeTestSchedule.mdb"
Dim stSQL As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = DBEngine.Workspaces(0).Databases(0)
Dim cn As DAO.Connection
Set cn = DAO.Connection
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open stdbName
stSQL1 = "SELECT initials FROM UserDataTable"
Set rs = db.OpenRecordset(stSQL1, dbOpenDynaset)
-Eric