Sorry if this question dupplicate with old post, BUt i can't find it.
I need to write macro in excel to open aaccess database and command to enable VBA macro in Access too.
After then wiill write macro to run query inside and export it (or get data from result query table) to excel file.
Sample from my current code
--------------------------------------------------------------------------------
Dim A as Object
Set A = CreateObject("Access.Application")
A.Visible = True
A.OpenCurrentDatabase ("D:\STD_POG\Check_STD_POG.accdb")
A.DoCmd.OpenQuery "qry_compare DF" <== stuck here, query not run by macro in access still disable
A.DoCmd.Quit
--------------------------------------------------------------------------------
Thank
Rasarusz
I need to write macro in excel to open aaccess database and command to enable VBA macro in Access too.
After then wiill write macro to run query inside and export it (or get data from result query table) to excel file.
Sample from my current code
--------------------------------------------------------------------------------
Dim A as Object
Set A = CreateObject("Access.Application")
A.Visible = True
A.OpenCurrentDatabase ("D:\STD_POG\Check_STD_POG.accdb")
A.DoCmd.OpenQuery "qry_compare DF" <== stuck here, query not run by macro in access still disable
A.DoCmd.Quit
--------------------------------------------------------------------------------
Thank
Rasarusz