Round DOWN in Access

Round DOWN in Access

Post by c2hhenppZ » Sat, 24 Jan 2009 00:32:03


I am not familiar with VBA. Is there a way in an MS Access query
(expression) to get my results of a function to round DOWN? They currently
round up or down depending on the result. I need the result to always round
DOWN.
Thanks, Sharon
 
 
 

Round DOWN in Access

Post by MV » Sat, 24 Jan 2009 00:48:54

Try the following untested function.

Public Function fRoundDown (dblNumber As Double, _
Optional intPlaces As Integer) As Double
fRoundDown = -Fix(-dblNumber * 10 ^ intPlaces) / 10 ^ intPlaces
End Function


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

 
 
 

Round DOWN in Access

Post by John W. Vi » Sat, 24 Jan 2009 02:40:23

On Thu, 22 Jan 2009 07:32:03 -0800, shazzie



The Int() function returns the next lower integer: Int(3.1) = 3, Int(3.887) =
3. Note that this applies to negative numbers too - Int(-32.15) = -33.
--

John W. Vinson [MVP]
 
 
 

Round DOWN in Access

Post by VHVvbm8gQy » Sun, 01 Mar 2009 06:39:03

Dear Sir,

how about decimals ?
I cant believe that ms access doesnt have any function like rounddown as in
ms excel.

Tuono C.