running an external command

  • Thread starter Thread starter Sergei Gorkov
  • Start date Start date
S

Sergei Gorkov

How do i run an OS command from Access?
What I need to do is to automate backups of a database.
a) compact it with compact Repair
b) ZIP and copy t some location

Thanks a lot!
 
Look at the Shell() command. It allows you to run any external program.
BUT be carefull as Your code will continue to execute while the external
command is still running. Access does not wait for the external command to
finish executing before executing the next line in your module.

If you want your code to stop executing until the external command is
finished, take a look at this link.

http://www.mvps.org/access/api/api0004.htm

Ron W
 
Back
Top