Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formating Fields
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00054260
Message ID:
00054263
Views:
26
>How can I format a character field for, if the field be SPACE(5), when I
>enter "1", be formated to "00001" or "222" be formated to "00222" ?
>
>Thanks,
> Alano Teles
> lano@programmer.net
>
>Obs : Sorry about my English...

Something like

this.value = REPLICATE("0",FSIZE(myfield) - LEN(ALLTRIM(this.value)) ) + ALLTRIM(this.value)

in Valid() event probably might help.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform