Round up to tens, hundreds, thousands etc from 2 dec places

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

Guest

Having a numbe like 12,345.67 how do I round it up to 12,000 or 12,300 etc.
Access 2003 near novice.
 
Unfortunately, the Round() function in Access is broken and does not support
negative powers of 10 like the Excel Round() function does.

You could use this one by Ken Getz:
Implementing a custom Rounding procedure
at:
http://www.mvps.org/access/modules/mdl0054.htm
Be sure to rename it so it doesn't fight with the built-in one.
 
On my website (www.rogersaccesslibrary.com), is a small Access database
sample called "SigFigs.mdb" which illustrates how to do this. Put your
value in Text0, choose 3 in the combo box, then click Calculate Number.

To use this, you need to copy the two modules into your Access database.
After that, it depends on what you are doing.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Hi, Tom.

You can use the round function to do this:

Round(v / 100) * 100 'Resulting 12300
or
Round([fieldname] / 1000) * 1000 'Resulting 12000

JanEinar

Tom Whyte skrev:
 
Try

round(MyNumber / 1000) * 1000
To get 12,000

Or
round(MyNumber / 100) * 100
To get 12300
 

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

Back
Top