Hi, I have a few fields on a database (which is used by a number of people) which keep getting accidentally altered - I would like to put in an 'after change' message box which would confirm whether the change was intentional, allow the change on a 'yes' response but undo the change on a 'no' so that the data had not been altered if the user didn't mean to. The bit I would be grateful for input/advice on is the undo function after a No response as at the moment that's the bit that isn't working!
I have got as far as:
Private Sub Text16_AfterUpdate()
Dim lngValue As Long
lngValue = MsgBox("Do you want to change the surname?", vbYesNo + vbQuestion, "Confirmation")
Select Case lngValue
Case vbYes = MsgBox("Thank you")
Case vbNo = fn.Undo
End Select
End Sub