Dim strMsg As String
strMsg = "资料已更改."
strMsg = strMsg & vbCr & "您想保存吗?"
strMsg = strMsg & vbCr & "点击[是]确定,点击[否]取消"
If MsgBox(strMsg, vbQuestion + vbOKCancel) = vbOK Then
Else
DoCmd.RunCommand acCmdUndo
End If
End If
DoCmd.Close
Exit_关闭_Click:
Exit Sub
Err_关闭_Click:
MsgBox Err.Description
Resume Exit_关闭_Click