Copy Data From protected access 97 Database to another Access database
My problem is as follow:
I Have two access database, both protected with different WorkGroup, then I need to Copy Table Products from DataBase A to DataBase B
for example:
HTML Code:
Dim A As dao.database
Dim wks As dao.Workspace
Dim strQuery As String
DBEngine.SystemDB = PathOfMDWA
Set wks = DBEngine.CreateWorkspace("", "UserNameA", "PasswordA")
Set A = wks.OpenDatabase(App.path & "\A.mdb")
strQuery = "SELECT * INTO PRODUCTS SELECT * FROM " & _
"[" & PathOfDataBaseB & ";Password=PasswordB;User ID=UserNameB;Jet OLEDB:System database=PathOfMDWB" & "].[Products]"
A.Execute strQuery
But It doesn't work
Any Ideas?
Thanks