Exit_btmSave_Click:
Exit Sub
Err_btmSave_Click:
MsgBox Err.Description
Resume Exit_btmSave_Click
End Sub
Private Sub btmClose_Click()
On Error GoTo Err_btmClose_Click
Dim n As String
If Me.btmSave.Enabled = False Then
DoCmd.Close
Forms("frmBB").Requery
Else
Response = MsgBox("Data has not been saved, Do you want to save it now? ", 4 + 32 + 256, "Notice")
If Response = vbYes Then
Call btmSave_Click
DoCmd.Close
Forms("frmBB").Requery
Else
If Me.Dirty Then DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
DoCmd.Close
End If
End If
Exit_btmClose_Click:
Exit Sub
Err_btmClose_Click:
MsgBox Err.Description, vbInformation, SoftName
Resume Exit_btmClose_Click
End Sub