Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Padding field with zeros when losing focus
Message
From
20/03/2006 12:36:20
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01105913
Message ID:
01105924
Views:
21
Hi,

In addition to Nick's reply - put a 'K' in the format field to select on entry...

Best,
Viv

>Can anybody help me please? Im going round the bend!!
>
>I have a textbox on a form for which I only want the user to enter numbers. In addition to this I want to limit the users to only entering a maximum of 10 numbers. Therefore I have set the input max to ##########. This works fine but when the users loses focus on this control I want to pad left of the number they have typed in with zero's.
>
>Therefore if the user types in 12345 then when they lose focus I want the system to put in 0000012345. I also want this field to be the first field when editing and the contents of the field to be highlighted.
>
>In the lost focus event I have tried:
>
>
>thisform.text1.value = PADL(thisform.text1.value,10,'0')
>
>
>I know im being stupid but I cant seem to move forward!
>
>Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform