I would appreciate if anyone help on this, I have below Quit command in access, but sometimes when use quit command, if the file read only, I get message can't quit access as make table is read only. Is there anyway, can add a line if the make table read only just, quit the application? Thanks.
Private Sub Quit_Application_Click()
DoCmd.Hourglass True
'Turns off the Access warning messages
DoCmd.SetWarnings False
DoCmd.OpenQuery "QueryExport"
DoCmd.Hourglass False
'Turns the Access warning messages back on
DoCmd.SetWarnings True
On Error GoTo Err_Quit_Application_Click
DoCmd.Quit
Exit_Quit_Application_Click:
Exit Sub
Err_Quit_Application_Click:
MsgBox Err.Description
Resume Exit_Quit_Application_Click
End Sub
Private Sub Quit_Application_Click()
DoCmd.Hourglass True
'Turns off the Access warning messages
DoCmd.SetWarnings False
DoCmd.OpenQuery "QueryExport"
DoCmd.Hourglass False
'Turns the Access warning messages back on
DoCmd.SetWarnings True
On Error GoTo Err_Quit_Application_Click
DoCmd.Quit
Exit_Quit_Application_Click:
Exit Sub
Err_Quit_Application_Click:
MsgBox Err.Description
Resume Exit_Quit_Application_Click
End Sub