In MS Access 2003 I used this code to compact and repair my database,
Public Sub CompactDB()
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Sub
But for some reason this doesn't work in MS Access 2007. That might be because MS Access 2007 does not have a Menu Bar.
How would I write the code to manipulate the menus in 2007 to compact and repair the database. This is a stand alone database.
Public Sub CompactDB()
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
End Sub
But for some reason this doesn't work in MS Access 2007. That might be because MS Access 2007 does not have a Menu Bar.
How would I write the code to manipulate the menus in 2007 to compact and repair the database. This is a stand alone database.