A97 Rounding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I'm using A97 and I am trying to round a number to two decimal places. Since the Round function was not introduced to Access until A2k, how do I round this number? After rounding this number, I want to convert to a string. I have gotten the number to "appear" rounded, but when I use the CSTR function, it makes shows it has having three decimal places again. Any help would be appreciated!
Thanks
Willy
 
The Round function introduced in Access 2000 using "banker's" or
"scientific" rounding, this rounds 1/2 to the nearest even number instead of
rounding up. To do the normal rounding up at 1/2 and round to 2 decimals:

RoundedResult = Int(NumberToRound * 100 + 0.5) / 100

--
Wayne Morgan
MS Access MVP


Willy said:
Hello,
I'm using A97 and I am trying to round a number to two decimal places.
Since the Round function was not introduced to Access until A2k, how do I
round this number? After rounding this number, I want to convert to a
string. I have gotten the number to "appear" rounded, but when I use the
CSTR function, it makes shows it has having three decimal places again. Any
help would be appreciated!
 
Back
Top