Round Up in Forms and Reports

  • Thread starter Thread starter mattc66 via AccessMonster.com
  • Start date Start date
M

mattc66 via AccessMonster.com

I need to round up on my forms and reports.

Example 20.635 needs to be 20.64

301.125 round up to 301.13.

What do I need in my formula?

Matt
 
I need to round up on my forms and reports.

Example 20.635 needs to be 20.64

301.125 round up to 301.13.

What do I need in my formula?

Matt

There's a sneaky trick for rounding up: use the Int() function which rounds
down, but do it on the negative of the number. That is, Int(3.5) rounds to 3,
but Int(-3.5) rounds to -4.

To round up to the nearest two decimals, use

-Int(-100 * [field]) / 100.

This will take 20.635 and change it to -2063.5; The Int will take that to
-2064; dividing by 100 and negating will take it to the desired 20.64.
 
Back
Top