Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    When Access quits it leaves an instance (Access XP)

    In the options I have set Compact on Close on.

    When I use Application.Quit to exit the database it does not compact on close. I would like to use this option but only if it compacts the database prior to closing.

    When I use CloseCurrentDatabase it compacts on close, but leaves the Access instance hanging around.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: When Access quits it leaves an instance (Access XP)

    CloseCurrentDatabase only closes the database itself, not the Access session. Application.Quit is primarily for automation. Try: <code> DoCmd.Quit </code>

    Afterthought: How are you determining that compact on close is not running? It generally is very fast.
    Charlotte

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: When Access quits it leaves an instance (Access XP)

    Thank you, the DoCmd.Quit works well.

    The compact on close is not that fast, I can see if it compacts or not by the progress bar at the bottom of the screen, it does not even go there, it's that fast on exitting.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: When Access quits it leaves an instance (Access XP)

    The time it takes varies. I've found that it is extremely fast in our commercial applications, and we don't usually see any progress indication or delay unless there is a very serious need for compacting. Have you checked the relative sizes of the file before and after close?
    Charlotte

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: When Access quits it leaves an instance (Access XP)

    Thank you for your response.

    Yes I realise that the time it takes varies.

    There is no doubt it is extremely fast, but when you click the exit button on the switchboard and keep your eye on the bottom left of the screen it displays a message that it is compacting and the dots that race along after that wording appear briefly depending on how long the compact takes.

    Yes I have checked that the size of the database does reduce after the DoCmd.Quit command.

Posting Permissions

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