troubleshooting Question

run access append query from excel

Avatar of PeterBaileyUk
PeterBaileyUk asked on
Microsoft AccessMicrosoft ExcelMicrosoft Applications
4 Comments2 Solutions410 ViewsLast Modified:
I tried this (found on ee) but hoping to run a query called qryTotalCWcarsYearsBreakdown but it fails on a.docmd.runmacro "qryTotalCWcarsYearsBreakdown"

so question is can i run an append query in this way from within excel?
Public Function RunAccessMacro()
'    Application.ScreenUpdating = False
'    Set A = CreateObject("Access.Application")
'    strDB = "N:\data\SimpleStats2.mdb"
'    A.OpenCurrentDatabase strDB
'    A.Visible = False
'    A.DoCmd.RunMacro "QryTotalCWCarsYearsBreakdown"
'    A.Quit
'    Set A = Nothing
'    Application.ScreenUpdating = True
End Function
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros