Hey all,
I know I’ve seen this here before, but I’ve searched and searched and can’t find it anywhere. I think my brain is mush.
I have a bunch of databases that download data periodically. I want to control them all through a single database (I don’t need to open them or anything, just have them run their code and do their thing for the day/month, depending on the db). So what I’d like to do is run functions from the control database that exist in the separate databases with the data in them. I haven’t gotten very far, because I’m not sure how you refer to the code?
Function runExternalCode()
Dim db As Database
Dim strDB As String
Dim strMacro As String
Dim strFunction As String
strDB = “c:MySmallerDb.mdb”
strMacro = “mcrTestMe”
strFunction = “TestMe()”
Set db = DBEngine.Workspaces(0).OpenDatabase(strDB)
???db.DoCmd.RunMacro strMacro???
End Function