How to Compact and Repair a DB within a Macro ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

Could somebody tell me how to compact and repair a db within a macro with
Access 2003 ?

Thanks & Regards,

Thomas
 
Hi Steve,

Thanks for your answer but when I try to do it, I receive the message:

"You can't compact the open database while running a macro or Visual Basic
code.
Instead of using a macro or code, on the tools menu, point to Database
Utilities, and then click Compact/Repair Database."

How can I avoid this message and run the compact from the macro ?

Best regards,

Thomas
 
Back
Top