Hello everyone i want to open 2 mdb's and run some macro's
i get the job done
but i get an error saying something about using OLE?!?
is the structure ok?open the first mdb execute the 3 macro
then open second mdb and run 1 macro
close
thanks in advance
i get the job done
but i get an error saying something about using OLE?!?
is the structure ok?open the first mdb execute the 3 macro
then open second mdb and run 1 macro
close
Code:
Dim A As Object
Set A = CreateObject("Access.Application")
A.Visible = False
A.OpenCurrentDatabase ("H:\Data\Sales.mdb")
A.DoCmd.RunMacro "Delete Data"
A.DoCmd.RunMacro "Import Sales"
A.DoCmd.RunMacro "Append to Master Table"
A.CloseCurrentDatabase
'A.Quit
'A.OpenCurrentDatabase ("H:\Data\Sales2.mdb")
'A.DoCmd.RunMacro "Append to ALL Sales"
'A.CloseCurrentDatabase
A.Quit
Set A = Nothing
thanks in advance