Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Input mask
Message
De
28/07/1997 13:04:38
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Input mask
Divers
Thread ID:
00041965
Message ID:
00041965
Vues:
73
I have a social security number field in which I need users to be able to type in the number with or without the dashes. I thought that the input mask property would provide for this, but typed dashes show up as extra characters. A format setting for all numeric characters only would also take care of the problem, but there is no such animal. I have tried to intercept the keycodes in the keypress event like this:

nodefault
if between(nkeycode, (code for 0), (code for 9)) or nkeycode = 45 && 45 = tab
dodefault()
endif

This seems to work at first except that after filling out the field, the cursor won't leave the text box and fire the valid code. It just sits there in the last position. What's happening here? Or better yet, how can I do this more gracefully?
Erik Moore
Clientelligence
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform