Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inputmask understanding
Message
From
07/03/2001 14:34:42
 
 
To
07/03/2001 14:19:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00482837
Message ID:
00482846
Views:
11
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform