Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One Cent Difference

Status
Not open for further replies.

tekaccess

Programmer
Oct 24, 2006
31
CA
Hi to all

I am getting something wrong calculation, When i add the three calculated values the answer is always one cent less. I do not know what is wrong.
Waiting for detailed help.

Thanks
 
How are ya tekaccess . . .

This is certainly a rounding/# of decimal places problem.

[blue]But since we have no example to go by we can only sit here & guess! . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
This happens if you do not round the detail lines before summing them. because the form/report is formatting them to two decimals, you may not be aware that the prices can be like $23.563, but every little .001 makes a difference and cumulatively can add one or more cents to the total.

 
In agreement with JoeAtWork, I have found that it is essential that monetary values are set to two decimal places as soon as possible, for nearly all businesses.

I think that Format on the input form where the calculation occurs is a good idea because [tt]Format(ThisPrice, "Fixed")[/tt] will store, say, 1.185 as 1.19, whereas Round stores 1.185 as 1.18, which is statistically more accurate, as Microsoft points out ( but probably not what you want.
 

tekaccess,

you'r handle mentions "access" but is that the application bing used?

If its Excel click on tools/properties/"precision as display." If you need an access answer, sorry.

don



[green]"They say that Fret A Stair was afraid of flights." I recommended a 12-step program.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top