I know this sounds easy and it should be, but I can't get this to work. As soon as the Access db opens, it closes again. I need to have a specific Access db open, I need to run repair and compact and have it shutdown. Anyone done this in vb script?
The easiest way is to just run the msaccess executable with the /repair switch. The following script attempts to repair the file test.mdb:
Set objShell = WScript.CreateObject("WScript.shell"
objShell.Run "msaccess d:test.mdb /repair", ,True
Regards,
Stein Borge
Author of: Managing Enterprise Systems with the Windows Script Host
Over 800 pages of practical solutions oriented material, providing detailed coverage of WSH 5.6, WMI,
ADSI, ADO, CDO, FSO and much more.
sb@nyetspam.enterprisewsh.com <- remove nyetspam when E-mailing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.