Shell command - not running like it should

marathonlady

Registered User.
Local time
Yesterday, 23:34
Joined
Jul 10, 2002
Messages
120
I have the following statement in my module:

X = Shell("d:\BOM\Wrapup.bat", 1)

The file that should be updated by this statement is not getting updated when it runs in the module, but if I run the Wrapup.bat on it's own, it updates the file. What could I be doing wrong?

Thanks for any help.
 
marathonlady,

Are you sure the shell command gets executed in your
module? Have you single-stepped through your module
with the debugger? Did the DOS window come up?

Wayne
 
Wayne

I just stepped through my program and Yes, the dos window comes up and the shell appears to run.
 
marathonlady,

If your .bat file is indeed getting run, there should be no
logical difference whether you run it manually or shell it.

Perhaps you are (in your Access App) expecting it to be done,
when it is still running. Try setting a breakpoint at the
shell line and then just hit the F8. Observe the DOS window,
verify that it completes and then continue.

If your app is just not waiting for it to finish you could do a
search on "Shell And Wait". That has been addressed in
this forum before.

Wayne
 

Users who are viewing this thread

Back
Top Bottom