Compact Database

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hi,

I am trying to compact a database using the following code at the end of a
routine to import a table:

CommandBars("Menu Bar").Controls("Tools").Controls("Database
Utilities").Controls("Compact and repair database...").accDoDefaultAction

It states that you cant compact whilts running code or in a module.

Do you know how I can compact this using code?

Martin
 
hi Martin,

I am trying to compact a database using the following code at the end of a
routine to import a table:

CommandBars("Menu Bar").Controls("Tools").Controls("Database
Utilities").Controls("Compact and repair database...").accDoDefaultAction

It states that you cant compact whilts running code or in a module.

Do you know how I can compact this using code?
As the message states: you cannot compact the open database where the
code is executed from itself. You can only compact another database.

Set the auto-compact property in the options menu of your database, tab
General, check-box "Compact on Close".


mfG
--> stefan <--
 
Back
Top