Good day to you all.
I am trying to write code which first cancels the before_update event, and then sets focus to another control. Sadly, it gives me the 2108 error that I have to save the field first. Tried the DoCmd.Save but unsuccessfully. Any ideas?
I am trying to write code which first cancels the before_update event, and then sets focus to another control. Sadly, it gives me the 2108 error that I have to save the field first. Tried the DoCmd.Save but unsuccessfully. Any ideas?
Code:
Private Sub Field1_BeforeUpdate(Cancel As Integer)
Cancel = True
Me!Field1.Undo
Field2.SetFocus
End Sub