A1VBCode Forums

Use Access 2007 as database?


http://a1vbcode.com/vbforums/Topic31689.aspx

By Smartchap - 10/17/2012

I had written a program which was using Access97 file (extension .mdb) as database file and was working well. Now I have converted that file to Access 2007 format (.accdb extension). What should I change in the program so that I could access this new file. The code used is



Public gwrk As Workspace

Public gdb As Database

Public rs As Recordset



Set gwrk = DBEngine.Workspaces(0)



'Set gdb = gwrk.OpenDatabase(App.path & "\Address_Book.mdb")

Set gdb = gwrk.OpenDatabase(App.path & "\Address_Book.accdb")



Set rs = gdb.OpenRecordset("select * from Addresses", dbOpenDynaset)



While running in line Set gdb=.... I get error "Unrecognised Database Format". Please help.
By Destroyer - 10/18/2012

Try this for converting your Access 97 database.



http://access.ezinemark.com/converting-a-database-to-ms-access-2007-file-format-3201caa0907.html