Rounding

  • Thread starter Thread starter b
  • Start date Start date
B

b

Hello all, The problem we are having is this

Have a Query running the for the detail of a report with the Cdbl function

the datasource stores the amount as 17.50600

when it comes in the query it shows up as 17.51 and when you click on it
17.506.


Normally we would want it to round to the 17.51 but in this particular case
we need to on the report as 17.50 we have tried all types of things but no
such luck .. this has to be something simple but so far this friday has
proved to be fruitless

Any help would be great thanx
 
B,
Since you are trying to "overpower" the Access normal rounding, I'd try a
work-around.
Why not treat the Number as a String for the purpose of "textually"
stripping the extra decimal places, without disturbing the root "number",
and then convert it back to a number...
Given [YourValue] = 17.50600
=Val(Left(CStr([YourValue]),InStr(CStr([YourValue]),".")+2))
would yield 17.50.
I tested this, and it seems to work OK...
hth
Al Camp
 
Back
Top