Access Compacting a database

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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?
 

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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Top