In your actual sample, I don't see anywhere where you're actually launching
MS access.
I am going to suggest that you move your code to a standard module and place
a subroutine in that module in which your code runs and does your series of
processes that you wanted to accomplish. In your example, you're using the
ado library and jet, but not actually launching MS access.
if you try to run a macro, or some DBA code in a standard code module inside
of MS access, then I suggest the following approach.
you can then run a script and execute that subroutine in a standard code
module as follows:
dim accessApp
set accessApp = createObject("Access.Application")
accessApp.OpenCurrentDataBase("C:\some path name\someMdb.mdb")
accessApp.Run "TimeUpDate"
accessApp.Quit
set accessApp = nothing
The above script will launch ms-access, and then run a sub called TimeUpDate
in a standard code module.
what your code does in the standard sub (called TimeUpdate in above) is up
to you. You can print reports, or do whatever you want.
I explain more how to set dispatch file not following article of mine
http://www.members.shaw.ca/AlbertKallal//BatchJobs/Index.html

Signature
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com