Batch File in Access

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

It is possible to run a batch file from Access? If so how
would I go about doing so? Additionally, can a batch file
be run from a macro in access?
 
You can use the Shell function in VBA. The problem is that anything started
with Shell runs asynchronously and your code keeps running. If this isn't a
problem, you're all set.

However, if your batch file needs to be finished before your code continues,
you'll have to jump through some hoops. Take a look at the article at
http://support.microsoft.com/default.aspx?scid=kb;en-us;209876.

As far as running from a macro, you could use the RunCode action to execute
this code.

Good luck.

Sco
 
Thank you for your help.
-----Original Message-----
You can use the Shell function in VBA. The problem is that anything started
with Shell runs asynchronously and your code keeps running. If this isn't a
problem, you're all set.

However, if your batch file needs to be finished before your code continues,
you'll have to jump through some hoops. Take a look at the article at
http://support.microsoft.com/default.aspx?scid=kb;en- us;209876.

As far as running from a macro, you could use the RunCode action to execute
this code.

Good luck.

Sco




.
 
Back
Top