How to stop currency control from displaying with more than 2-digit precision

Margarita

Registered User.
Local time
Yesterday, 19:09
Joined
Aug 12, 2011
Messages
185
Hello,
I have a form with textboxes that display various sums from a table. The summed fields in the table are currency and display precision only to the hundredth's place. The format of the textboxes on the form is also currency. When you just look at them, they display two places after the decimal point, but if you set focus on them, they display more decimal places. How do I make it stop displaying with that level of precision?
Thank you.
 
Have you considered using Round(), or you are looking for something more accurate??
 
Have you considered using Round(), or you are looking for something more accurate??


I have not used round for these sums. I am going to give it a shot. What would be my other options in terms of accuracy? The fields are either sums from currency fields in a table, or sums of the detail section of the form itself (also formatted as currency).
Thank you.
 
If you have gone through the link it would have mentioned that..
The Round function utilizes round-to-even logic.
In other words this is called as Bankers-Rounding.. This is not accurate specially when it comes to Currency.. If the value is 12.399999 and you use Round(12.399999, 2) Normal human calculation would be 12.40, but using Round will be 12.38... So if accuracy of data matters, you might have to resort to other function.. by which I mean work around's/user defined functions..

There are plenty of examples/working codes available online..
 
If you have gone through the link it would have mentioned that..

In other words this is called as Bankers-Rounding.. This is not accurate specially when it comes to Currency.. If the value is 12.399999 and you use Round(12.399999, 2) Normal human calculation would be 12.40, but using Round will be 12.38... So if accuracy of data matters, you might have to resort to other function.. by which I mean work around's/user defined functions..

There are plenty of examples/working codes available online..


Haha I compeletely ignored the fact that that's a link! Thank you!
 

Users who are viewing this thread

Back
Top Bottom