Rounding in MS Access

后端 未结 12 695
夕颜
夕颜 2020-11-28 14:23

Whats the best way to round in VBA Access?

My current method utilizes the Excel method

Excel.WorksheetFunction.Round(...

But I am l

12条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 15:04

    In Switzerland and in particulat in the insurance industry, we have to use several rounding rules, depending if it chash out, a benefit etc.

    I currently use the function

    Function roundit(value As Double, precision As Double) As Double
        roundit = Int(value / precision + 0.5) * precision
    End Function
    

    which seems to work fine

提交回复
热议问题