Form Before_Update
Dim Msg, Style, Title, Response, MyString
MsgBox "Do you wish to save the changes . ", vbOKOnly, ""
Style = vbYesNo + vbExclamation + vbDefaultButton1 .
Title = "Save changes?"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
DoCmd.RunCommand acCmdSaveRecord
Else:
Me.Undo
End If
End Sub