S
Song
I added following code (copied from
http://www.mvps.org/access/general/gen0041.htm )
before my Docmd.quit
Private Sub cmdExit_Click()
'Compact database before close
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
DoCmd.Quit
End Sub
It seems to work. however, the screen flashed before quit (probably the code
want to reopen the database, then quit). How to suppress the screen flash,
or modify the code so it would not flash? thanks.
http://www.mvps.org/access/general/gen0041.htm )
before my Docmd.quit
Private Sub cmdExit_Click()
'Compact database before close
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
DoCmd.Quit
End Sub
It seems to work. however, the screen flashed before quit (probably the code
want to reopen the database, then quit). How to suppress the screen flash,
or modify the code so it would not flash? thanks.