Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formating Fields
Message
 
À
13/10/1997 14:10:15
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00054260
Message ID:
00054716
Vues:
41
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform