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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Percent formmating returning incorrect

Status
Not open for further replies.

kmclane

Technical User
Apr 14, 2004
321
US
I have a report with several percent fields. These are pulled from a query that is averaging several records. That part works fine. I have the format for the report fields set to percent and the decimal to auto.

0.698563697962807 returns 69.86%
0.027976470390478 returns 2.78%
0.584862985684035 returns 58.49%

This makes no sense to me. I tried setting the decimal places to three, but it was even worse. Any suggestions?
Thanks, Ken

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
What do you want it to return?

0.698563697962807 IS 69.86%

They all seem correct to me.

-Gary
 
0.027976470390478 returns 2.78%
should return 2.80.
Try setting the decimal to 2 and then re-checking your values.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Ok it's working the way it is supposed to, I have other issues, like when I have a transaction for a dollar(test trans) it throws the percentages way off. I need to re think my methodology. Thanks, Ken.

- If you are flammable and have legs, you are never blocking a fire exit.
Mitch Hedburg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top