If you have VB, you can create a small VB executable that will connect to
your db thru either ADO for pure SQL statements or DAO to perform native Jet
functions. Just set the Project/References to the proper .DLL libraries, and
point the .connection to your database
Here is an example I found, this isn't my code.
The attached VB code links to any Access database and executes a public
Module function which reloads a bunch of tables, then compacts the database
and externally backs it up into a timestamped archive.
Basically all you need is the shell. Modify it to call your own function,
compile it and call. In this case, the db name is passed in on the command
line.
Option Explicit
Dim appAccess As Access.Application
Dim DBOldPath As String
Dim DBNewPath As String
Sub Main()
Dim WkTime As Date
On Error GoTo DPUAutoLoadError
If Trim$(Command$) = "" Then
Exit Sub
Else
DBOldPath = Mid$(Command$, 2, Len(Command$) - 2)
Set appAccess = CreateObject("Access.Application.8"
appAccess.OpenCurrentDatabase DBOldPath, False
appAccess.Run "DPUAutoUpdate"
appAccess.CloseCurrentDatabase
WkTime = Now()
DBNewPath = Mid$(DBOldPath, 1, InStr(1, DBOldPath, ".", 1) - 1) & _
"_" & Format$(DatePart("yyyy", WkTime), "0000"

& "_" & _
Format$(DatePart("m", WkTime), "00"

& _
Format$(DatePart("d", WkTime), "00"

& "_" & _
Format$(DatePart("h", WkTime), "00"

& _
Format$(DatePart("n", WkTime), "00"

& _
Format$(DatePart("s", WkTime), "00"

& _
".mdb"
appAccess.DBEngine.CompactDatabase DBOldPath, DBNewPath
Kill (DBOldPath)
appAccess.DBEngine.CompactDatabase DBNewPath, DBOldPath
appAccess.Quit 1
Set appAccess = Nothing
End If
Exit Sub
DPUAutoLoadError:
MsgBox "Error " & Err & ": " & Err.Description
Resume Next
End Sub
Dodge20