Compact and Repair - Help!!

  • Thread starter Thread starter Norma
  • Start date Start date
N

Norma

I am using Access 97 and Windows 2000. I tried the
approach of using the CommandBars module. That is not
working for me. It gives me a message, when it reaches a
the ToolsMenus command that variable not recognized. What
I am trying to accomplish is when the database is first
opened, from the switchboad I would like to provide a
compact and repair button. I have also tried the
domenuitem approach, but evidently I either don't have the
syntax correct or it is an approach that won't work.

I would appreciate any help.

Thanks

Norma
 
You can not compact the current database through code. A database can only
be compacted when it is closed. When you click a menu option or toolbar
button to compact the current database, Access closes it - compacts it - and
then re-opens it. You can not do that sequence of actions, from within a
single database, through code.

HTH,
TC
 
Back
Top