CEILING function doesn't work

  • Thread starter Thread starter Alex Brown
  • Start date Start date
A

Alex Brown

When I try to use this function in a query I get the
following message:

Undefined function 'ceiling' in expression.

Can anyone help?

Thanks,
Alex
 
The Ceiling function is an EXCEL function and is not an Access function. You
can write a function to do this in VBA.

UNTESTED AIRCODE follows that should handle positive numbers. It may introduce
errors if the number passed in has less digits in the decimal portion than the
number of digits you wish to roundup to. For instance, fRoundup(.1,2) might
return .11


Public Function fRoundUp(dblNumber As Double, _
Optional intPlaces As Integer) As Double
fRoundUp = -Int(-dblNumber * 10 ^ intPlaces) / 10 ^ intPlaces
End Function
 
Back
Top