Round DOWN in Access

S

shazzie

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
 
J

John Spencer (MVP)

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
 
J

John W. Vinson

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

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.
 
T

Tuono C.

Dear Sir,

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

Tuono C.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top