Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Force field content
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01346533
Message ID:
01346539
Vues:
11
This message has been marked as the solution to the initial question of the thread.
Something like
lcDigits = "0123456789"
lcLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
lcAllowedChars = lcDigits + lcLetters 
lcValue = "7CM4991"
* Is it valid?
? LEN(CHRTRAN(lcValue, lcAllowedChars, "")) = 0 ;
		AND LEN(CHRTRAN(lcValue, lcDigits, "")) > 0 ;
		AND LEN(CHRTRAN(lcValue, lcLetters, "")) > 0
>I have a field
>
>Suppose use enter data to the field, as would like the behaivor as below:
>
>"ABDF"
>= messagebox ("Field must contain numbers and letters")
>
>"8887"
>= messagebox ("Field must contain numbers and letters")
>
>7CM4991
>= messagebox ("OK")
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform