1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access Compacting a database

Discussion in 'Business Applications' started by tdeyarmo, Oct 1, 2003.

Thread Status:
Not open for further replies.
  1. tdeyarmo

    tdeyarmo Thread Starter

    Joined:
    Sep 16, 2003
    Messages:
    8
    I have several databases in Access 97 that reach their maximum size during operation. I have to compact the database and start over each time. It sure would be nice to be able to insert some code in the startup module/macro that would compact the database before running the remaining code.
    Is it possible to compact the database that is currently open with some code in the startup macro/module?
     
  2. Anne Troy

    Anne Troy

    Joined:
    Feb 14, 1999
    Messages:
    11,746
    First Name:
    Anne
  3. tdeyarmo

    tdeyarmo Thread Starter

    Joined:
    Sep 16, 2003
    Messages:
    8
    Thanks. I like the idea of upgrading to 2000. I think that's my best choice.

    I did stumble across something worth mentioning. I created a batch file called run.bat and put it in my path (c:\winnt\). The batch file consisted of these three lines:

    C:\MICROS~1\Office\MSACCESS.EXE %1 /COMPACT
    C:\MICROS~1\Office\MSACCESS.EXE %1
    exit

    Now, everytime I want to run a program, but compact it first, I click on Start/Run/browse select all files and find the access program that I want to run. When I select it and it is placed in the "Open" box, I put the word "run" in front of it and put the path and access program in quotes like this:

    run "c:\my documents\Data export.mdb"

    When the run.bat is excuted, the first line will compact the database, the second line will run it. Ahhhh... the good ole' DOS days.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/168828

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice