Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency field display problem
Message
From
09/10/2001 03:20:13
 
 
To
08/10/2001 10:25:43
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00565353
Message ID:
00565823
Views:
18
Hi,
I am asking this for my curiosity.
a) Dragan, If u are developing a application where diferent currencies are involved would u use a numeric data type or a currency data type.
b) Knowing the pros & cons of using a currency data type and if your user wants to view currency data in 2 decimal digits or 3 decimal digits instead of 4, what would u do?
c) Are all the applications developed in VFP using currency datatype display 4 decimal digits. (pls note :i am only saying about displaying the figures.)

sanjay.

>>Hi,
>>I am having a small difficulty. I have a currency field which is displayed on the form in a text box but this field would not obey
Set Decimals To 2
>>Set fixed On
setting. The only way i can control the display is by changing the textbox format property to $999,999,999.99 and than it would show me values in 2 decimal digits.
>>How can i make Set Decimal setting effective on currency fields?
>
>Vlad has already told you the best things to do, I'll only give you the reasons: currency fields are basically integers, which hold the value multiplied by 10000. Whenever such a value is used in calculation, it's practically divided by 10000 (OK, I don't believe they really multiply and divide each time, but that's the effect), so it always has four decimals. The "Set decimals" applies to regular numbers which have variable number of decimals; this one is fixed.
Sanjay Dhiraj Patel

MCSE, MCDBA

Net2Biz (Thailand)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform