|
在表字段里可以表示小数,做了一个累加的程序,但结果是四舍五入的,如何显示成小数以后几位呢,请大家帮忙.
Private Function jishuan(f1 As Boolean, f2 As Boolean, f3 As Boolean) As Long
On Error GoTo Error_jishuan
Dim v1, v2, v3
v1 = Nz(DLookup("[Value]", "a2", "factorname='factor1'"))
v2 = Nz(DLookup("[Value]", "a2", "factorname='factor2'"))
v3 = Nz(DLookup("[Value]", "a2", "factorname='factor3'"))
If f1 = -1 Then jishuan = v1
If f2 = -1 Then jishuan = jishuan + v2
If f3 = -1 Then jishuan = jishuan + v3
Exit_jishuan:
Exit Function
Error_jishuan:
Resume Exit_jishuan
End Function
[ 本帖最后由 cuxun 于 2008-5-28 15:11 编辑 ] |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|