Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field: Display as an integer
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00362682
Message ID:
00362698
Vues:
19
About the only way to do this is to NOT bind the textbox to a ControlSource. Use the Refresh [if you skip through records in the form] or Init [if the record never changes during the life of the control] to set the value of the textbox with the Ceiling() function. Add a custom property to the control, cControlSource, where you identify the ControlSource of the control. In the LostFocus of the control you can put code to replace the cControlSource with the new value.

>I have a form that calculates fields to several decimal places. Is there a way for the user to see the field on a form as a rounded up integer?
>
>Example: The real number is 5.9, but the user should see 6. If I use 999,999 as the format, the user sees 5 not 6.
>
>I don't want to change the real number so the round() function won't do it. I just want it to display 6 without decimals. The underlying number should remain at 5.9 unless the user enters a different number eg 7, then the underlying number should change to 7.0.
>
>Can someone point me in the right direction?
>
>TIA
>Cyril.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform