Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Force field content
Message
De
11/09/2008 06:03:47
 
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:
01346536
Vues:
13
This message has been marked as a message which has helped to the initial question of the thread.
Hi Moises,

you could use regular expressions, but if there is no special position for numbers and letters you could do sometghing like this:

lcString = "7CM4991"
?LEN(CHRTRAN(lcString,"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ","")

In case of LEN() = 0 your String is OK.

>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")
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform