Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enter percentages as whole numbers?
Message
From
26/01/2007 10:05:40
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01189535
Message ID:
01189607
Views:
8
>>>I have a data entry form containing percentage fields that are defined as N(4,2). I would like the users to be able to enter 100% as 100 rather than 1.00, 50% as 50 rather than 0.50, and so on. Is there some formatting option that supports this or is my only option to change the field definitions to N(3,0)? (They can never be greater than 100%).
>>
>>Changing textbox.inputmask to '999' is the most logical way.
>
>
>I just tried that. It lets me enter, for instance, 100 for 100%. So far, so good. Unfortunately, it also stores it that way. I want to store it as 1.00 to avoid having to change the data structure, which is used by a number of calculation problems. That may be what I wind up doing anyway. It's not like it's tricky to always divide the stored value by 100 in calculations.

I don't want to confuse you, or to start old discussions here. Personally, I don't bind controls to data (i.e. controlsource) so it's never a problem for me, just a simple calculation in a generic method to fill/save data.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform