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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Database Option 'COMPACT On Close' by code 1

Status
Not open for further replies.

heiland5

Programmer
Dec 19, 2003
3
US
As related to Thread number "thread705-909476" on compacting an Access database within VBA, how can I change the "Compact on Close" option (Tools --> Options) on-the-fly within VBA code when an Access application program is opened?

Thanks!
 
Found it:
Application.SetOption ("Auto Compact"), 1
 
How are ya heiland5 . . .
Code:
[blue]   Application.SetOption "Auto Compact", [purple][b]True/False[/b][/purple][/blue]

Calvin.gif
See Ya! . . . . . .
 
Thanks "TheAceMan1". I also found the same code in a different web search.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top