Compact And Repair

dapfeifer

Bringing Maverick Mojo
Local time
Today, 01:44
Joined
Jun 17, 2008
Messages
68
Hey all,

I need to have compact and repair run after my import code finishes. How do I code that so that C&R executes at that time? Sendkeys may work somehow, but I haven't exactly heard good things about using that.

Thanks ahead of time...
 
Last edited:
I read that you can not do a Compact and Repair on the database while it is open because after compacting out the redundant space it checks code so it would close the code running before checking it so you would have an incomplete procedure.

Hey all,

I need to have compact and repair run after my import code finishes. How do I code that so that C&R executes at that time? Sendkeys may work somehow, but I haven't exactly heard good things about using that.

Thanks ahead of time...
 
I read that you can not do a Compact and Repair on the database while it is open because after compacting out the redundant space it checks code so it would close the code running before checking it so you would have an incomplete procedure.

Seems to be the case. I found some code that may have worked, but access comes back and says that I cannot run C&R in a Macro or VBA, so I suppose I'll just set it to C&R on close and recommend that the user close and reopen the DB...thanks for the help though!
 

Users who are viewing this thread

Back
Top Bottom