Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inputmask understanding
Message
De
07/03/2001 14:34:42
 
 
À
07/03/2001 14:19:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00482837
Message ID:
00482846
Vues:
12
>I have a serial number field that I need to set up so that a user can only enter the sn in with the format 9999999-99 (up to 7 numbers, a dash, up to two numbers). It is possible for the user to enter in less than 7 chars, in which case I will need to pad zeros on the front. I don't really want an inputmask to show for the user, I just want it to convert it after they hit the OK button. Is there a way to do this?


You could use the PADL() function in the Valid or LostFocus event of the textbox:
THIS.Value = PADL(ALLTRIM(THIS.Value), 9, "0")
Sylvain Demers
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform