Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Input mask
Message
From
28/07/1997 13:30:18
 
 
To
28/07/1997 13:04:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00041965
Message ID:
00041971
Views:
29
>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?

Do following:
Text.Format="R"
Text.Inputmask="999-99-9999"
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform