Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formating Fields
Message
 
To
13/10/1997 14:10:15
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00054260
Message ID:
00054716
Views:
36
>Since FSIZE returns the file size in bytes, perhaps Nick meant a different function. The way I'd do it is
>
>this.value = PADL( ALLTRIM( this.value ), '0', 5 )
>
>in the valid().
>
>>>this.value = REPLICATE("0",FSIZE(myfield) - LEN(ALLTRIM(this.value)) ) +
>>>ALLTRIM(this.value)
>>>
>>>in Valid() event probably might help.
>>>
>>>Nick
>>
>>
>> Thanks Nick, but when I run the form, I receive the following error
>>message "Too long sequence bla,bla..."
>> Alano Teles

>Since FSIZE returns the file size in bytes, perhaps Nick meant a different function. The way I'd do it is
>
>this.value = PADL( ALLTRIM( this.value ), '0', 5 )
>
>in the valid().
>
Actually it can return both:
From VFP help
***************************
The current setting of SET COMPATIBLE determines if FSIZE( ) returns the size of a field or a file. If SET COMPATIBLE is set to OFF or FOXPLUS (the default), FSIZE( ) returns the size of a field. If SET COMPATIBLE is set to ON or DB4, FSIZE( ) returns the size of a file.
****************************
but your and Dragan ways do the job too.

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