Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error '3343': Unrecognized database format 'xyz.accdb'

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
GB
I'm trying to add records from Excel to an Access 2010 database. I seem to have OK code when adding to a database from a previous version but when I try:-

Code:
Set db = OpenDatabase("C:\Documents and Settings\des.lavender\Access\LBLTest1.accdb")

I get the above error message.

I've tried a few variations of:-
Code:
Dim db As DAO.Database

but this seems to be a connection problem I can't solve. It has been suggested that adding Microsoft Office 12.0 Object Library to 'Tools | References' would help. I downloaded the appropriate file from microsoft.com but it "failed to install".

I thought this might be true as I got some code to download from Access that appears to work just fine:-
Code:
With ActiveSheet.ListObjects.Add(SourceType:=0, Source:=Array( "OLEDB;[b]Provider=Microsoft.ACE.OLEDB.12.0[/b];Password="""";User ID=Admin;Data Source=C:\Documents and Settings\des.lavender\Access\LBLTest1.accdb;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=6;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data=False"), Destination:=Sheets("Sheet" & T).Range("$A$1")).QueryTable

Any idea please?

Many thanks,

Des.
 
Not sure, but your problem may be the same as mine. See solution.
Thread181-1652628
 
I had this issue and I believe I fixed it by adding the Microsoft DAO 3.6 object library. I was using the 3.5. Hope this helps.

Ernest

Be Alert, America needs more lerts
 
That is the solution when going from Access 97 to 2000,2002,2003 format but not 2007/2010
Code:
For example, the DAO 3.5 library was designed for Access 97, whereas DAO 3.6 is designed for Access 2000, 2002, and 2003. Access 2007 uses the ACEDAO library to give you the new functionality in the private JET engine.

For Access 2007 you need the reference to the
Microsoft Office 14.0 Access Database Engine Object

If you cannot reference the above then the download I posted may (or may not help)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top