O.K., so I am trying to run a macro from another database on our network from a local database so I do not have to copy over the 40+ database objects to the local one. I could not find a way to accomplish this with just a macro so I started writing a module but I think I am missing something. Here is the code I am using:
Public Function Test_ext()
Call Test_ext_sub
End Function
Public Sub Test_ext_sub()
Dim dbs As DAO.Database
Set dbs = OpenDatabase("O:\data\pur\response\VOA_DAS_Daily.mdb")
DoCmd.RunMacro ("RunInvoices")
End Sub
When the code runs it errors out stating that:
"VOA Metrics Dev can't find the macro 'RunInvoices'"
I know the macro exists as I had just created it. Also, the VOA Metrics Dev database displayed in the error is the local database, not the one on the network.
Is the code not opening up the network database correctly?
Any help is greatly appreciated.
Thanks
Public Function Test_ext()
Call Test_ext_sub
End Function
Public Sub Test_ext_sub()
Dim dbs As DAO.Database
Set dbs = OpenDatabase("O:\data\pur\response\VOA_DAS_Daily.mdb")
DoCmd.RunMacro ("RunInvoices")
End Sub
When the code runs it errors out stating that:
"VOA Metrics Dev can't find the macro 'RunInvoices'"
I know the macro exists as I had just created it. Also, the VOA Metrics Dev database displayed in the error is the local database, not the one on the network.
Is the code not opening up the network database correctly?
Any help is greatly appreciated.
Thanks