Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    compact/repair in code (Access 2003, XP SP 3)

    I have some code that runs but results in a VERY large db file growth (6K to 436K). Compact/Repair works just fine but I wanted to include this in the code itself. is this even possible? Access demands that user goes to tools -->compact/repair and I'd rather not have to train people to do that.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: compact/repair in code (Access 2003, XP SP 3)

    See Compact the Current Database from Code (works in Access 2000, 2002 and 2003, and I suppose in Access 2007 too although I can't test that).

    The method mentioned there works only in the English language version of Access. The following variation works in all languages:
    <code>
    CommandBars.FindControl(ID:=2071).accDoDefaultActi on</code>

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: compact/repair in code (Access 2003, XP SP 3)

    thanks - worked.

Posting Permissions

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