469,600 Members | 2,246 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

Compacting a database on close


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
2 3046
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
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.

Similar topics

1 post views Thread by ColinWard | last post: by
3 posts views Thread by Pachydermitis | last post: by
7 posts views Thread by DavidB | last post: by
1 post views Thread by Slez via AccessMonster.com | last post: by
3 posts views Thread by DSSMaster | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.