Microsoft Access 2000

  • Thread starter Thread starter Mako Mark
  • Start date Start date
M

Mako Mark

Okay guys, has any one tried a calculation in a query on a
currency data type? For some reason any results ending in
$###.50 were rounded down instead of to the nearest whole
dollar. Anybody seen this rounding before?

Query example:

Round(1.5*[column containing currency data type])
 
You have the syntax incorrect for the ROUND function.
Should be ROUND(Number, Number of places)
For example: Round(2 * 1.38,1) will give you a result of 2.8.
Check out the Access help file for the ROUND function for more details. The
ROUND function has some specific rules about how it rounds. If this doesn't
meet your requirements than look into MOD and FIX functions for working with
currency calculations.

Cheers,
Henry
 
Okay guys, has any one tried a calculation in a query on a
currency data type? For some reason any results ending in
$###.50 were rounded down instead of to the nearest whole
dollar. Anybody seen this rounding before?

To be more precise: results ending in 0.5 are rounded *to the nearest
even value*. That is, 3.50 and 4.50 both round to 4. This is called
"Banker's Rounding" and it's done by design, so that a large
assemblage of values are equally likely to round down as to round up,
keeping the total of all the values (closer to) the same as the total
of all the unrounded values.
 
Back
Top