CJBIRKIN
Drink!
- Local time
- Today, 09:22
- Joined
- May 10, 2002
- Messages
- 255
Hello
I've asked this ages ago and never got a satisfactory answer.
Is there a way of running a macro in one database from another. i've written
Dim ws As DAO.Workspace
Dim db As DAO.Database
' Create Microsoft Jet Workspace object.
Set ws = CreateWorkspace("", "admin", "", dbUseJet)
' Open Database object from saved Microsoft Jet database for exclusive use.
Set db = ws.OpenDatabase("C:\NEWWAITINGLIST\COMBINE_MONTHLY-WAITING-LIST-MANAGERS.mdb")
With db
DoCmd.RunMacro ("MACRO_MAKE_LIST")
End With
Set db = Nothing
Set ws = Nothing
I have been able to use a container and document loop and have "seen" the macro in the other database but I can't get it to run.
I tried adding a dot before the docmd but it doesn't appear on the list of operators
With db
.DoCmd.RunMacro ("MACRO_MAKE_LIST")
End With
Any help would be greatfully recieved
Chris
I've asked this ages ago and never got a satisfactory answer.
Is there a way of running a macro in one database from another. i've written
Dim ws As DAO.Workspace
Dim db As DAO.Database
' Create Microsoft Jet Workspace object.
Set ws = CreateWorkspace("", "admin", "", dbUseJet)
' Open Database object from saved Microsoft Jet database for exclusive use.
Set db = ws.OpenDatabase("C:\NEWWAITINGLIST\COMBINE_MONTHLY-WAITING-LIST-MANAGERS.mdb")
With db
DoCmd.RunMacro ("MACRO_MAKE_LIST")
End With
Set db = Nothing
Set ws = Nothing
I have been able to use a container and document loop and have "seen" the macro in the other database but I can't get it to run.
I tried adding a dot before the docmd but it doesn't appear on the list of operators
With db
.DoCmd.RunMacro ("MACRO_MAKE_LIST")
End With
Any help would be greatfully recieved
Chris