vbscript - Close MS Access (.accde) file if open -


i have .vbs script copies master ms access application distribute users called accessapp.accde. file located @ specific location on network. when run .vbs script, accessapp.accde copied network location specific local location same name, overwriting file if exists.

this works great!

my hurdle closing file @ user's local location if it's open. important because app performs version check internally , runs external script if user's version out-of-date. script should close file before copying down new file on it, , open again. seems should simple, can't figure out proper vb syntax used check if file (specifically .accde) open, , close if is.

does make sense? missing simple here?

since accessapp.accde includes procedure shells out vbscript replaces accessapp.accde, tell access shut down after calling vbscript :

application.quit ' optionally followed acquitsaveall or acquitsavenone 

you can modify vbscript wait bit in order give access time complete shutdown before copying on new accde:

wscript.sleep 2000 ' units milliseconds, 2 seconds 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -