how to round up a value to next digit

R

rohan

if the answer is 5.222 then I want it to be shown as 5
if it is 6.32 then it should be 7
 
L

Lynn Trapp

In all rounding systems I am aware of, 6.32 would be rounded down to 6. What
basis are you wanting to use to detect whether or not a number should round
up? Do you want all displayed numbers to be odd numbers? If that's the case
then you would have to use something like this in a query:

Iif (Int(YourNumber) Mod 2 = 0, Int(YourNumber) + 1, Int(YourNumber))

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Big List: www.ltcomputerdesigns.com/JCReferences.html
 
Top