Hale, Jim
Jim.Hale at FleetPride.com
Wed May 23 13:44:09 CDT 2007
Thanks Gustav, I tried this back when it was posted and had no luck.
I'll give it another go. Thanks
Jim Hale
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Wednesday, May 23, 2007 11:37 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] DoEvents - How should this command be used in
Access?
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
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.