Hi,
Frustration.............
Can anybody tell me why sub listed below will not work - it jumps to next control regardless how many characters are keyed in LastName (won't even give Msgbox if < 10).
Is there a better way to validate keyed Form data ?
Thank you...jnh
Private Sub LastName_BeforeUpdate(Cancel As Integer)
If (Len([LastName] < 10)) Then
MsgBox "zzzzzzzzzzzz" & " " & Len([LastName])
Cancel = True
Me.LastName.SelStart = 0
Me.LastName.SelLength = Len(LastName)
End If
End Sub
Frustration.............
Can anybody tell me why sub listed below will not work - it jumps to next control regardless how many characters are keyed in LastName (won't even give Msgbox if < 10).
Is there a better way to validate keyed Form data ?
Thank you...jnh
Private Sub LastName_BeforeUpdate(Cancel As Integer)
If (Len([LastName] < 10)) Then
MsgBox "zzzzzzzzzzzz" & " " & Len([LastName])
Cancel = True
Me.LastName.SelStart = 0
Me.LastName.SelLength = Len(LastName)
End If
End Sub