Discussion Locked

Rounding Down in Access

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anyone know how to round down a figure in an Access report. Or alternatively any standard formula for rounding down a number. This ones killing me.

4 replies

by sachin

Give this a try:

(Int(([YourNumber]-0.1)/1000)+1)*1000

I substract 0.1 as a safety just in case the number is exactly 10,000 to leave it at 10,000 rather than making it 11,000.

by d_gilmour_1978

Function roundDown(numbertoround As Single, dp As Integer) As Single

roundDown = (Int(numbertoround * 10 ^ dp)) / (10 ^ dp)

End Function

'note dp is the number of decimal places you want

this bit of code should solve you problem

This discussion is closed to new replies.