task sch, Accees VBA (2 Viewers)

idxyz

New member
Local time
Today, 15:44
Joined
May 18, 2020
Messages
28
hi,
My OS is Win 10 x64 with Access 16 database program.
Recently have noticed that when bat executed from task scheduler and Access is launched, the vba code stops running.
If bat file ran manually, access database program launches and executes as normal.
 
Last edited:
on that pc, it might be a protection issue.... set enable all macros:

set Trust center settings:
access menu:
File,
options,
trust center, (left pane)
trust center settings btn, (right pane)
Macro Settings,(left pane)
Enable all macros
 
i did follow this, still the same, no change.
 
Did you remember to identify the correct username under which to run the batch job? By default, something run by Windows Task Scheduler is not run as you but as SYSTEM. I could imagine a recent patch having an effect on stuff run as the wrong user.

To clarify - Ranman256 could be right in that it is a protection issue - but wrong about why.
 
Did you remember to identify the correct username under which to run the batch job? By default, something run by Windows Task Scheduler is not run as you but as SYSTEM. I could imagine a recent patch having an effect on stuff run as the wrong user.

To clarify - Ranman256 could be right in that it is a protection issue - but wrong about why.
the sch task option that is checked on is "whether user is logged on or not". It acts the same whether I am logged in or not.
how do i make sure right user is running batch in any case?. Do i have to set the permission levels in security tab for the batch property?.
 
It's been a while since I've played with this, but you should have a "Run As..." option that lets you pick the username. It will have that option unless it has finally been "fixed" to default to the username of the person requesting the schedule. Can't tell you how long ago it was since I've used it, but t the default wasn't the activating user when I first ran across this feature. Of course, I first used it before the advent of WinNT, and that's quite a while ago.
 
the sch task option that is checked on is "whether user is logged on or not". It acts the same whether I am logged in or not.
how do i make sure right user is running batch in any case?. Do i have to set the permission levels in security tab for the batch property?.
1727253469542.png
 
hi,
still did not make a difference. is there a log on option or setting to enable mdb run through task sch?. like there is one for log on for bat files.
 
Just as a test, try running a bat file from the bat file in Task Scheduler
 
Gasman has a great strategy for troubleshooting. Break a process down to its simplest steps and test. When the simple works, add another minor process and test.
 
I have always had to execute scheduled tasks using the option "Run only when user is logged on" on servers.

 

Users who are viewing this thread

Back
Top Bottom