Gustav Brock
Gustav at cactus.dk
Wed May 23 11:36:58 CDT 2007
Hi Jim
You could use ShellWait to pause the code until the batch file quits:
http://databaseadvisors.com/pipermail/accessd/2004-May/023342.html
/gustav
>>> Jim.Hale at fleetpride.com 23-05-2007 17:23 >>>
I have a similar issue where I shell out to run a bat file and then kill
the bat file. The problem is Access continues to run and sometimes
attempts to kill the file before it has finished running generating an
error. I put in a timing loop but this strikes me as a little klutzy. Is
there a better way? TIA
Jim Hale
varAns = Shell(strBatfile) 'run bat file to load prn file to AS400
Batfile = True
varTime = TimeSerial(Hour(Now()), Minute(Now()), Second(Now()) + 3)
Application.Wait varTime
Kill strBatfile
Kill strCmdfile