Compact Database

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
 
S

Stefan Hoffmann

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 <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top