Tech Support Guy banner
Status
Not open for further replies.

Access Compacting a database

1K views 2 replies 2 participants last post by  tdeyarmo 
#1 ·
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?
 
#3 ·
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
Not open for further replies.
You have insufficient privileges to reply here.
Top