klandreth
03-15-2013, 05:28 PM
:banghead: I KNOW my database is not corrupt. I cannot get the following command to work on any of three computers with MS Access 2007, no matter what database I specify (Northwind or my own).
I'm running Access 2007 on Windows 7 platforms. I have both DAO 3.6 and Access 12.0 libraries checked in the references section. My DAO commands work fine from INSIDE Access, but I'm trying to connect to an Access db through Outlook. I also ran the test using Excel, and it failed there as well.
What I am I missing?:dunno
Sub Test_DAO
Dim db As DAO.Database
Dim rs As DAO.Recordset
Const dbPath As String = "C:\Users\e574651.GLOBAL\Documents\Northwind 2007.accdb"
On Error Resume Next
Set db = DAO.OpenDatabase(dbPath)
'Set rs = db.OpenRecordset("customers")
Debug.Print Err.Number, Err.Description
End Sub
3343 Unrecognized database format 'C:\Users\e574651.GLOBAL\Documents\Northwind 2007.accdb'.
I'm running Access 2007 on Windows 7 platforms. I have both DAO 3.6 and Access 12.0 libraries checked in the references section. My DAO commands work fine from INSIDE Access, but I'm trying to connect to an Access db through Outlook. I also ran the test using Excel, and it failed there as well.
What I am I missing?:dunno
Sub Test_DAO
Dim db As DAO.Database
Dim rs As DAO.Recordset
Const dbPath As String = "C:\Users\e574651.GLOBAL\Documents\Northwind 2007.accdb"
On Error Resume Next
Set db = DAO.OpenDatabase(dbPath)
'Set rs = db.OpenRecordset("customers")
Debug.Print Err.Number, Err.Description
End Sub
3343 Unrecognized database format 'C:\Users\e574651.GLOBAL\Documents\Northwind 2007.accdb'.