0
votes

When deploying a small Excel VBA code to access a .accdb 2010 database to my colleague, who is running Excel 2007. I get the following error

run-time error '-2147467259 (80004005)':

Unrecognized database format '\dbname.accdb'

I'm pretty stuck on this bug as it works in Excel 2010, but not in excel 2007? My DB connection code is below:

' Declarations
Dim conn As Object
Dim rs As Object
Dim strConnect As String
Dim strng As String

' Open Database
Set conn = CreateObject("ADODB.Connection")
' Define the connection String
strConnect = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
                "Data Source=" & _
                Glo_Database_Path & ";"
' Open Connection
conn.Open strConnect

Any ideas how to connect to an accdb 2010 from Excel 2007 64bit?

1
Have you considered DAO? It is faster. stackoverflow.com/questions/30973591/…Fionnuala
Not yet no... but I wouldn't get past the cn.Open strCon callCromeX
i'm not good in this kind of problem but have you try using macro recording to record establishing the connection in excel 2007 to the access 2010 db? i'm just hoping it would shed some light.Rosetta

1 Answers

0
votes

I believe accdb 2010 is not supported by Excel 2007 (but Excel 2010 supports it)

Save as the accdb 2010 to mdb format and try your connection.