Access compact and repair code

  • Thread starter Thread starter George Moore
  • Start date Start date
G

George Moore

Does anyone have code for the compact and repair process
that I can put in my application?
 
doesn't work, says the application needs to be closed first
sigh
 
I am not sure if this will answer you problem or not, but it is the answer I
came up with for the same problem in my databases.
Under Tools - Options, there is an option to "Compact on close." If you
check this box, the database will be compacted when it is closed. This
seems to work in a shared environment as well. The catch is that you have
to have the right version of Access for the option to appear.

Lori
 
Jeff Clark said:
doesn't work, says the application needs to be closed first
sigh

If you are trying to compact a backend from your frontend then you
must close all bound forms and reports as well as any recordsets you
may have open.

You can verify this during testing by looking for the presence of the
ldb file in the backends folder.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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

Back
Top