Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String Help
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00488659
Message ID:
00488664
Views:
9
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform