Cancels a cancelable event (an event that has a Cancel parameter).
Private Sub Form_BeforeUpdate(Cancel As Integer) If MsgBox("Are you sure you want to save changes to this record?", _
vbYesNo Or vbInformation, "Confirm Upate") = vbNo Then
DoCmd.CancelEvent End If End Sub