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

Formatting Calculated currency fields

Status
Not open for further replies.

Gavroche00

Technical User
Feb 4, 2004
49
0
0
US
I am drawing a blank. I have a calculated field in a report giving a currency readout (2 decimals). However, there are more then two decimals when it calculates it. I forgot where to go in the table or the query to require that the raw data is also two digits only. I.E. I have the amount $23.15 but when I use this amount, the actual number is $23.1499987. I want that number to be stored as $23.15 in the underlying calc.

Thank you for your help.

David
 
I think it would be better to set the properties of the underlying table where this value is stored...

goto the field in the table, make the field type number, and then set the decimal places to 2...
 
David,
You don't "store (values) in the underlying calc". You only display calculated values. Did you try set the format property of the text box in the report to Currency and Decimals to 2?

If so, did it work?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Dear Crowley,

Yes I did already. There is a limit of 2 dec. in each field.

Dear Duane,

Yes I did. So it does display with two digits past the decimal. However, take this example. $23.08*$4.33 = $99.936. Even though it will display as $99.94, if I use the text box for another calc, I will have rounding problems. I know there is a way around it coz I ran into this problem before, but I forgot where exactly.

Thank you for your help,.

David
 
Sorry Guys, I found it:

Ccur(Clng([txtbox]*100))/100

Thanks for the help

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top