[AccessD] Rounding UP (solved)

Gustav Brock Gustav at cactus.dk
Mon Jun 9 05:04:06 CDT 2008


Hi Jeff et al

This is easier than most believe and one of my favourites (which I believe I has posted before, though I can't locate it) ...

Everyone knows that Int(SomeValue) rounds SomeValue down to the nearest Integer. 
7.07 becomes 7, and -1.5 becomes -2.

But what if you wish to round up?
That's easy. Just use the negative value and reverse the result:

  intUp = -Int(-SomeValue)

Now 7.07 becomes 8, while -1.5 becomes -1.

/gustav






More information about the AccessD mailing list