Hopefully you will appreciate that I wasn't being awkward but trying to give you good advice
All the previous comments are still valid but as requested, here's an answer to your question (hopefully!).... ![angel](images/smilies/other/angel.gif)
The code below opens the external database, runs a macro then closes the external database
Optionally it closes the current database as well
Code:
Public Function RunExternalDatabase() As Boolean
Dim app As Access.Application, strPath As String
'Start a new Access application
Set app = New Access.Application
'Open the remote database and run a macro, then close the remote database
With app
'Syntax: .OpenCurrentDatabase(filepath, Exclusive, strPassword) - the last 2 items are optional
strPath = "C:\Programs\MendipDataSystems\JATFA\JATFA.accdb" 'replace with your file path
.OpenCurrentDatabase strPath, True, "password"
' .DoCmd.RunMacro "YourMacroNameHere" 'run your macro
.CloseCurrentDatabase 'closes external database as that is current
End With
'Quit the spawned app
app.Quit acQuitSaveNone
Set app = Nothing
'Quit the current app - optional
Application.Quit acQuitSaveNone
End Function