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.
|