现在我想用IF判断语句来完成百分比(我的发贴"sql查询百分比,急急!"我还没有解决,所以想通过前台判断来完成.
[If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = "实际产量构成比例" then] 除以 [if mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = mct1.Fields(1) + "实际产量构成比例" Then ] 怎么定义啦?请各位大侠帮忙解决....
也就等同于:型号/系列
[If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = "实际产量构成比例" then] 除以 [if mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = mct1.Fields(1) + "实际产量构成比例" Then ] 怎么定义啦?请各位大侠帮忙解决....
也就等同于:型号/系列
不过,看不懂 LZ 的要求,不知道要的是哪种If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = "实际产量构成比例" then If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = mct1.Fields(1) + "实际产量构成比例" Then
End If
End If
或If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = "实际产量构成比例" thenElse If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = mct1.Fields(1) + "实际产量构成比例" Then
End If
End If
-------------------------------------------------
系列1 系列 型号 项目 数据 比例
平版 aa aa-201 实际产量 100
平版 aa aa-201 实际产量构成比例 200
平版 aa aa-202 实际产量 200
平版 aa aa-202 实际产量构成比例 300
平版 aa aa-203 实际产量 400
平版 aa aa-203 实际产量构成比例 200
平版 aa系列 aa系列 实际产量 700
平版 aa系列 aa系列 实际产量构成比例 700
---------------------------------------------------
我想要的是
If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = "实际产量构成比例" then '数据1
a=msflexgrid1.TextMatrix(msflexgrid1.rows - 1, 3)
End If
If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = mct1.Fields(1) + "实际产量构成比例"Then
b=msflexgrid1.TextMatrix(msflexgrid1.rows - 1, 3)
End If If mct1.Fields(1) = mct1.Fields(1) And mct1.Fields(3) = "实际产量构成比例" then '数据1
msflexgrid1.TextMatrix(msflexgrid1.rows - 1, 3)= a / b
End If