I was trying to round off a Money Value in a Currency field
eg,
Result = 3.31 !Code:Dim MV as Currency A = 3.00 B = 1.10 MV = (A * B) + 0.005 MV = MV / 100 MV = MV * 100
Currency Variables must therefore have their own rounding rules
I overcame the problem with
Result = 3.30 CorrectCode:Dim MV as Currency A = 3.00 B = 1.10 MV = (A * B) + 0.005 MV = (Int(MV * 100)/100)
Can anyone suggest a better way to deal with this common calculation requirement




Reply With Quote