Round to nearest 10,000

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

Guest

I'm fairly new to Access 2003 and am trying to round a column of calculated
values to the nearest $10,000 for a report. When I try to build an expression
for the field, I fail miserably.

When I click on the math/round function, It returns:

Round (<number>, <precision>)

Everywhere I look for help, the verbage is different. I've tried what seems
like every combination with no luck.

Can anyone help????
 
Hi LJ,

You could use the round function like this:

round(YOUR_FIELD/10000, 0)*10000

ie: divide your number by 10000 then round it to zero decimal places - this
would round 1.49 and below to 1 and 1.5 and above to 2, then multiply by
10000 to get your zeros back.

Hope this helps.

Damian.
 
Damian's answer is probably the simplest solution, but an alternative is to
implement a custom rounding function like this one:
http://www.mvps.org/access/modules/mdl0054.htm

Be sure to rename it so it doesn't fight with the built-in one.
You can then round a value like this:
MyRound([MyField], -4)
just as you can in other languages and in Excel.

Unfortunately, MS hasn't fixed the Round() function in Access yet, not even
in A2007.
 
Back
Top