I would like to prompt the user to confirm if changes are intended for certain field(s). I am using the BeforeUpdate property of the fields I want prompts on. But I can't get the following code to work. If Yes is clicked, it should save, which it does. If No is clicked, it should revert to the previous value. Here's my code:
Code:
If MsgBox("Are you sure you want to update the First Name field?", vbYesNo) = vbYes Then
DoCmd.Save
Else
DoCmd.CancelEvent
Me.txtContactFirstName = Me.txtContactFirstName.OldValue
End If