By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,139 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,139 IT Pros & Developers. It's quick & easy.

Compacting a database on close

P: n/a

Hi I have a database that I would like to be able to compact when the
exit button on the main form is clicked. Can anyone help with this?

TIA

Colin
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If you are the only one with the database open and if you have Access 2002 (and perhaps
2000, I don't remember), one of the options under Tools|Options is Compact On Close. DON'T
try compacting a database that someone else may have open.

--
Wayne Morgan
"ColinWard" <cw***@nospam.com> wrote in message
news:3f*********************@news.frii.net...

Hi I have a database that I would like to be able to compact when the
exit button on the main form is clicked. Can anyone help with this?

Nov 12 '05 #2

P: n/a
ColinWard <cw***@nospam.com> wrote:
Hi I have a database that I would like to be able to compact when the
exit button on the main form is clicked. Can anyone help with this?


When the user exits the FE attempt to rename the backend MDB preferably with todays
date in the name in yyyymmdd format. Ensure you close all bound forms, including
hidden forms, and reports before doing this. If you get an error message, oops, its
busy so don't bother. If it is successful then compact it back.

See my Backup, do you trust the users or sysadmins? tips page for more info.

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
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.