L
Larry Adams
From Excel, I would like to execute a predefined Access macro to run a
series of 20 or so queries. But I am not finding a good reference.
My current Excel VBA code is illustrated below. It works, but, the problem
is, anytime I enhance the query set on the Access side, I need to also
change and mimic in Excel. I'd rather just have Excel run the predefined
macro in Access. Any thoughts?
Thanks in advance. Excel and Access are both 2002 SP2. Larry
================================================
Sub Update_Access()
Dim db As Database, rs As Recordset
Dim path As String
'
Worksheets("MODEL").Select
path = Worksheets("MODEL").Range("PATH") & "MODEL.mdb"
'
Set db = OpenDatabase(path)
db.Execute "PROD A100 - CLEAR TABLE"
db.Execute "PROD A110 - APPEND RECS"
db.Execute "PROD A120 - UPDATE 1"
db.Execute "PROD A130 - UPDATE 2"
...
...
db.Close
'
End Sub
series of 20 or so queries. But I am not finding a good reference.
My current Excel VBA code is illustrated below. It works, but, the problem
is, anytime I enhance the query set on the Access side, I need to also
change and mimic in Excel. I'd rather just have Excel run the predefined
macro in Access. Any thoughts?
Thanks in advance. Excel and Access are both 2002 SP2. Larry
================================================
Sub Update_Access()
Dim db As Database, rs As Recordset
Dim path As String
'
Worksheets("MODEL").Select
path = Worksheets("MODEL").Range("PATH") & "MODEL.mdb"
'
Set db = OpenDatabase(path)
db.Execute "PROD A100 - CLEAR TABLE"
db.Execute "PROD A110 - APPEND RECS"
db.Execute "PROD A120 - UPDATE 1"
db.Execute "PROD A130 - UPDATE 2"
...
...
db.Close
'
End Sub