标题:求助vb编程中出现的问题
取消只看楼主
狂飙的蜗牛1
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2015-5-19
结帖率:100%
已结贴  问题点数:10 回复次数:1 
求助vb编程中出现的问题
Dim f As Double
Dim f1 As Double
Dim f2 As Long
Dim e1 As Double
Dim j As Double
Dim sql2 As String
sql2 = "select * from  集中载荷表 where 车型='" & Trim(Combo1.Text) & "'"
rs_find2.CursorLocation = adUseClient
rs_find2.Open sql2, conn, adOpenKeyset, adLockPessimistic
f = Val(Text1.Text)
rs_find2.MoveFirst
Do While Not rs_find2.EOF
j = rs_find2.Fields("容许载重(t)")
e1 = j - f
If e1 >= 0 Then
Exit Do
End If
rs_find2.MoveNext
Loop
rs_find.MovePrevious
f2 = rs_find2.Fields("平车地板负重面长度(mm)")
f1 = rs_find2.Fields("容许载重(t)")
c = 1000 * (f - f1) / (j - f1) + f2
Label9.Caption = c

老是显示c = 1000 * (f - f1) / (j - f1) + f2溢出 请大家帮帮忙
搜索更多相关主题的帖子: where 
2015-05-19 11:58
狂飙的蜗牛1
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2015-5-19
得分:0 
c是double

取出的值f1和j相同
2015-05-19 12:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-445478-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.367988 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved