Results 1 to 4 of 4
  1. #1
    ineuw's Avatar
    ineuw is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Location
    Canada
    Posts
    33

    Repairing and compacting a MS Access 2007 standalone dataase

    How can I repair and compact a standalone database by macro, or VBA? In other words, how does an Access 2007 standalone database repair and compacts itself through the menu button. I know (and understand why) that the database has to be closed. Just want to know how I can do what Access does by manual interaction?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    In vb, you'd open another instance of Access and use it to compress.

    Dim appAccess As Object
    Set appAccess = CreateObject("Access.Application")

  3. #3
    ineuw's Avatar
    ineuw is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Location
    Canada
    Posts
    33
    Thanks ranman256.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I marked this thread as Solved for you using the Thread Tools at the top of the thread.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 01-18-2016, 09:23 AM
  2. Replies: 2
    Last Post: 01-02-2014, 07:53 AM
  3. Access for standalone
    By TheShabz in forum Access
    Replies: 14
    Last Post: 11-12-2011, 04:15 PM
  4. Compacting and Repairing the database
    By rohnds in forum Programming
    Replies: 0
    Last Post: 07-27-2010, 02:52 AM
  5. Compacting MS Access
    By ksenthilbabu in forum Access
    Replies: 4
    Last Post: 08-20-2009, 04:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums