Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with decimal places
Message
De
30/06/2004 17:05:15
 
 
À
30/06/2004 17:01:50
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00919377
Message ID:
00919381
Vues:
15
>I hope this is an easy one. I have a textbox on a form that is used to display and allow update of a price. The initial value on this textbox is 0.00 and when the user changes values, it keeps the 2 decimal places. In some cases, the user can select something else on that form and it will change the contents of the price textbox. When this happens, the value changes to 0 without the decimal places and the user can no longer add a decimal in that field - it tabs to the next one when they try.
>
>I tried using SET FIXED ON, but that changes the decimal places on other fields on that form such as quantity. Is there any easy way to force the values in that textbox to stay with two decimal places? I tried debugging to find out where it changes, but it is several forms deep and I am having a very difficult time with the debugger when moving that deep.
>
>Thanks,
>
>Randy Wessels

Sounds like somewhere the .Value of that textbox (or of it's ControlSource) is being set to an integer 0. Try setting the Picture property of the textbox to have your proper width and decimal places (ie: "9999.99").

that was the old PICTURE clause in FPD/W. The InputMask property is the correct one. Aging, just say no! ;)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform