Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

enable/disable compact and repair via vba?

Status
Not open for further replies.

Spidy6123

Technical User
May 30, 2002
227
CA
Hey,
I was wondering if there's a way to enable/disable the compact and repair option via vba?

this doesn't seem to be working..
CommandBars("Menu Bar").Controls("Tools").Controls("Options").Controls("General").Controls("Compact on Close").Enabled

Any help is much appreciated.

TIA
 
Thanks anyways guys.. found it

Application.SetOption "Auto Compact", True


Cheers
 

Be aware you should always do a backup before compacting! Compacting sometimes causes corruption to raise its ugly head!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Exactly why I'm controlling it via VBA.. it was being compacted on a network drive and failing..

I have now implemented logic so that the database will not run on the network drive.. (SQL backend so the access frontend is mobile)

Thanks for the good advice ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top