Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2005

Tip: Looking for answers? Try searching our database.

Compact database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Markus Weber (Megalith GmbH) - 25 Feb 2005 09:01 GMT
Hello!

I just want to compact the current database as done when I use the
menu point to compact and repair a database. How can I accomplish
this?

Currently I find mthods only to compact other databases, but not the
current one itself.

Thanks in advanve!
Nikos Yannacopoulos - 25 Feb 2005 09:53 GMT
Markus,

There's a very good reason for this! To compact a database, Access
actually closes it, compacts it into a new file, deletes the old file
and renames the new one the old one's name. Apparently you can't do all
that with code within the database itself - the last thing done will be
to close the original.
Some do it by forcing the execution of the menu item from code, but it
is not recommended, and it is practically not required either in the
sense that:
(a) if it is a single user database, or the front end of a multi-user
one, you can use Compact on Close which will do the job just fine,
without any programming, or any manual action required by the user;
(b) if it is the back end of a multi-user database, you don't do it from
within itself anyway, nor could you do it most of the time simply
because other users are logged in. In this case I would recommend a
scheduled job to do it automatically overnight, when no users are in.

HTH,
Nikos

> Hello!
>
[quoted text clipped - 6 lines]
>
> Thanks in advanve!
Markus Weber (Megalith GmbH) - 25 Feb 2005 12:50 GMT
hi Nikos,

you are right, so now I use the option you told (Compact on Close).
Thanks!

>Markus,
>
[quoted text clipped - 27 lines]
>>
>> Thanks in advanve!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.