A quick fix is to run as a Shell from a Windows script file. Put the following in a file such as START.vbs. Alter the database name to yours. With nChoose=0 your database tables and application will not be visible.
Code: Select all
Dim sFileName, sTitle, nChoose
' /////// NOTE: Edit variables in this section ///////
'
sFileName = "MyDatabase.odb"
sTitle = "Run Batch Silent"
nChoose= 0 '1 =show database, 0 = not show
'
' /////// NOTE: Edit variables in this section ///////
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
If Not oFSO.FileExists(sFileName) Then
oShell.Popup sFileName & " - run file not found", 10, sTitle, vbCritical + vbSystemModal
Wscript.Quit 1
End If
' run the batch file with quotes added
iRC = oShell.Run("""" & sFileName & """", nChoose, True)
' Return batch file error level when exiting script
Wscript.Quit iRC
Such a script file is also useful for preliminary work such as copying stuff from one folder to another, e.g. I use one to copy from Dropbox to a working folder before running the application.
Regards
Nocton