Hello'
I am attempting to provide validation for a field on a form through a
command.
(the validation is only part of the command). The field is a text box
formatted as a fixed number...
Basically I want the resulting value to only be allowed to be between
2 & 8.
The code works fine for the greater than (>) but for some reason does
not work for less than(<) ??
abbreviated code snippet:
If Me.Field "2" And Me.Field < "8" Then
Me.cmdSave.Visible = True
MsgBox ("Good")
Else
MsgBox ("Bad")
If Me.cmdSave.Visible = True Then
Me.cmdSave.Visible = False
End If
End If
I even went as far as to leave out the AND portion of the statement &
only put in the 1 criteria (less than 8) & vice versa. Also used the
(.Value) qualifier for the field.
The greater than 2 criteria works everytime (whether after the less
than AND) portion of the line or before it, or on it's own with no AND
statement.
But the less than # will NOT work???
Any ideas why?