|
请问为何我的数据库里计算56.54X5430的得数总是307012.22,而不是307012.20?我已经用了一个四舍五入的函数来控制其得数了,但还是显示307012.22,我的那个四舍五入函数是在这里下载的,代码如下:
Option Compare Database
Option Explicit
Public Function RoundToLarger(dblInput As Double, intDecimals As Integer) As Double
Dim strFormatString As String
If dblInput <> 0 Then
strFormatString = "#." & String(intDecimals, "#")
RoundToLarger = Format(dblInput, strFormatString)
Else
RoundToLarger = 0
End If
End Function
我的公式为"=" RoundToLarger(56.54*5430,2),但得数是307012.22,请各位帮忙解决,谢谢! |
|