Round to nearest 10,000

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????
 
G

Guest

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.
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top