Going slightly skewy on this one. I want user to confirm date entered is OK and if not to clear field back down and allow entry of new date. Sounds reasonable to me and I am sure I have done it before but cannot find the line of code.
I have got
But if I hit the no button it nulls out the field as wanted but sets the focus to the next field on the form, not the txtNewMot field.
Edit - just realised I removed the code Me.txtNewMot.SetFocus since it was not working
Anyone got any ideas what is going on?
Thanks
I have got
Code:
Private Sub txtNewMot_AfterUpdate()
Dim varResponse As Variant
varResponse = MsgBox("You are about to enter a new MOT date. Are you sure?", vbYesNo, "Confirmation required")
If varResponse = vbNo Then
Me.txtNewMot = Null
End If
End Sub
Edit - just realised I removed the code Me.txtNewMot.SetFocus since it was not working
Anyone got any ideas what is going on?
Thanks