I have a form which conatins a command button to compact and repair the database when the button is clicked. It doesn't seem to work any longer with Access 2010. Here is my code:
Private Sub Command111_Click()
On Error GoTo Err_Command111_Click
CommandBars("Menu Bar"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
I need to be able to compact and repair using 2003 and 2010 (and 2007) with a command button. How can I fix this?