Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String Help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00488659
Message ID:
00488664
Vues:
10
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform