Re: Rounding to nearest 1000

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Try it and you'll see .....

By the way, using another application's library, unless that application in
that version will always be available on the PC where your database is
running, is a problem waiting to happen because of broken references. It's
not usually a good idea to load up your application with such overhead for
such a simple function's use -- program your own or use the built-in ACCESS
VBA functions.
--

Ken Snell
<MS ACCESS MVP>



"Darrell" <dcyphers@xxxxxxx> wrote in message
news:u0Kk7daxGHA.3788@xxxxxxxxxxxxxxxxxxxxxxx
Ken Snell (MVP) wrote:
CInt(YourNumber / 1000) * 1000


Thank you, Ken. The only catch is that, unless I misunderstand this, I'm
going to get the next LOWER 1000, rather than the NEAREST 1000. If
MyNumber is 3900, dividing by 1000 will give me 3.9. CInt will give me 3,
and multiplying by 1000 will give me 3000. What I would like in this case
is 4000.

Darrell


.



Relevant Pages