Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
strMsg = "Are you sure you want to change this data?"
If VBA.MsgBox(strMsg, vbYesNo + vbDefaultButton2 _
+ vbQuestion) = vbNo Then
Me.Undo
Exit Sub
End If
End Sub