Have a VBA Module in Access 2007 which performs similar actions in a For loop. At the end of every loop I wish to compact and repair the current database before proceeding to the next iteration.
Reason : In every iteration I create , use for calculation and delete a table. The size should remain under control.
Using SendKeys , I cannot compact and repair - if calling the module from a Form Button. Any trick to ensure that the SendKey works fine and the Module continues onto the next iteration flawlessly. Some idea to control Form loading / Module execution / Checking Status etc. End Purpose being to wait just long enough till the Compacting is done and then move on. Also how to safely ensure that SendKeys / (suggest alternate) for compacting works fine.
Thanks