>There is the following code that does not work for a value entered with a leading zero. The <> compares the "001" to a numeric 1 and they are not equal. The intent is to validate that three numeric digits were entered into the textbox. The textbox can not be defined as numeric because it is used for other codes that are not numeric. How can I fix the code to validate that three numeric digits were entered?
>
>Thanks
>
>Brenda
>
If m.code_id = "COLLATTYPE" AND ;
<b> not (isdigit(subs(m.code,1,1)) and isdigit(subs(m.code,2,1)) and isdigit(subs(m.code,3,1)))</b>
=wmsgbox("This field must be a 3 digit numeric code.", ;
"Information","info.bmp","OK")
RETURN
ENDIF
Doru