I have an Access 2003 database, and a little vbs program that runs every night to refresh a table from the mainframe. The vbs program looks like this:
The problem is when OpenCurrentDataBase starts the program, the Startup form opens. The vbs program is run by the windows scheduler on a server in batch mode. How can I disable the startup form if running in batch, but open the startup form when not in batch?
Code:
dim objAccess
set objAccess = createObject("Access.Application")
objAccess.OpenCurrentDataBase "c:\myDir\myProg.mdb"
objAccess.Run "Nightly_Update"
objAccess.Quit
set objAccess = nothing
The problem is when OpenCurrentDataBase starts the program, the Startup form opens. The vbs program is run by the windows scheduler on a server in batch mode. How can I disable the startup form if running in batch, but open the startup form when not in batch?