Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Thanked 0 Times in 0 Posts

    function CompactOnClose (Access 2000)

    I know of the possibility to check the box Compact OnClose in the General Options
    of the database. However,is there also a code for this purpose?
    My code creates several databases and they have to be opened in order to check the box in the Options.
    If i have a code instead, it will make things easier for me.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: function CompactOnClose (Access 2000)

    You can use SetOption to set an option, and GetOption to retrieve an option. The online help provides a list of the options you can set. For Compact on Close, use<pre>SetOption("Auto Compact") = True</pre>

    Don't forget the space between Auto and Compact.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts