I have a vbscript that opens Access and calls a function. The .Visible property for the Access application is set to False in the script. Up until a few days ago I was not seeing any visible Access windows as the script ran, which was perfect. Running on Windows 10 64bit.
Recently I upgraded to Office 365 and ever since the upgrade the script runs without issues, however as it is exiting Access a couple of Access windows flash open and close before the script completes.
I have tried saving the DB as .mdb vs .accdb, calling with both 32bit or 64bit versions of cscript / wscript but the windows persist. It seems to happen just as Access is closing inside the script.
Why is this suddenly happening and how do I fix it? Are there workarounds to run Access without the windows displaying on close?
Below is an example of the script I have tested with that has this problem.
<job id="wsf">
<script language="VBScript">
db_dir = "//mytestnetworkpath.com/somefolder/test.accdb"
Set app = CreateObject("Access.Application")
app.Visible = False
app.UserControl = False
app.OpenCurrentDatabase(db_dir)
app.Quit
Set app = Nothing
</script>
</job>