Roundup expression?

  • Thread starter Thread starter Cory
  • Start date Start date
C

Cory

I was using the expression builder just now in a form and needed to round
the result of my formula up but all I could find was a ROUND function. In
Excel there is a ROUNDUP function, how do I do the same in Access?

In case that doesn't make sense I'll give you my exact example: I have a
text box in a form that multiplies three form fields. They are the inch
dimensions of a box. If I am shipping any service other than UPS ground they
use dimensional weight if it is more than the actual weight. Dimensional
weight is defined as L*W*H/160. Now if the DW ends up being 12.375# I need
to declare it 13# but the ROUND function will make it 12#.Hope this helps.

Thanks!
 
I don't think there is a built in function in Access,
here is what I did in a simialr situation in VB. Create a
function (I called mine RoundUp) and give it a double
arguement type (single if it will work for you). If you
want to round up any fractional value (i.e. 1.0001
becomes 2) do round(val) + 1. If you have some threshold
below which you would round down first check if the
decimal portion is < that value and round up if it isn't.
HTH
 
Thanks. A bit too complicated for me so I'll just live with it. I wonder if
there is a way to do it mathamatically....
 
Use the expression:
-Int(-[YourNumber])

For example (from AXP Debug window):
?-Int(-12.375)
13

HTH
Van T. Dinh
MVP (Access)
 
Back
Top