Easy way to compact an Access 2003 database

P

Pat Dools

Hello,

I will be handing over an Access 2003 database that will be used for data
entry and some light reporting. I have a button on the Switchboard that will
close the database, but I would also like to have a button that offers the
option to compact the database as needed. I understand that the 'Compact on
closing' option only compacts the 'front end' objects. My database is not
split out to 'front end' and 'back end'. My database contains everthing
within the one .mdb file and I intend to have the Database Window hidden, so
I won't be offering the option of going to 'Tools... Database Utilities...
Compact and Repair Database...'. Is there some code that I could stick
behind a command button to compact my database to make it easier for the user
to do this?
 
T

Tom van Stiphout

On Sun, 12 Apr 2009 18:04:08 -0700, Pat Dools

Unless this db is used in single-user mode not splitting the db is a
REALLY BAD IDEA.

To compact the db, offer a shortcut on the desktop:
<path_to>msaccess.exe <path_to>your.mdb /compact
Or schedule it to happen overnight (assuming server deployment).

-Tom.
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top