Hi
I'm using the BeforeUpdate event to validate data (catch nulls). This works fine unless a user happens to enter data and then delete it. Error 2108 generated.
Can someone explain what is happening?
Thanks in advance
Stewart
--------------------
Private Sub txtControl_BeforeUpdate(Cancel As Integer)
Dim iAns As Integer
Dim strMsg As String
If IsNull(Me!txtControl) Then
strMsg = "txtControl should be entered. Click OK to do so, Cancel" _
& " to leave it blank anyway:"
iAns = MsgBox(strMsg, vbOKCancel)
If iAns = vbOK Then
Cancel = True
Me!txtControl.SetFocus
End If
End If
End Sub