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!