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

Rounding Problem on Currency Field

Status
Not open for further replies.

needadvice

Programmer
Apr 7, 2002
145
US
I have a report on which I multiply the values in two text fields in a third field (text41) in an Access Report
Text41's Control Source =[text212]*[Text30].
The value in text212 is $4,550.
The value in Text30 is 55.921
My answer is $2,544.41. I need $2,544.40
How do I get rid of the extra penny?

No one here has figured this out. I checked other posts, but nothing seems to work.
Any Ideas?
 
What you're asking for is the ability to round down which Access does'nt do. Well here is how you do it change your control source to:

=CCur(CLng(0.49 - ([Text212]* [Text30])))

Beware though this always round down.

HTH Savil
 
=CCur(CLng(0.49 - ([Text212]* [Text30])))
This code produced the result (2,544.00)
I need $2544.40

 
To round "x" in the manner you describe:
Fix(x * 100) / 100

Note that if negative products are possible, you may need to use Int() instead of Fix(). The difference between them is described in the help topics for Int() and Fix().

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top