Dim a As WinForm.TextBox = Forms("窗口1").Controls("TextBox1")
Dim b As WinForm.TextBox = Forms("窗口1").Controls("TextBox2")
Dim c As WinForm.Label = Forms("窗口1").Controls("Label1")
Dim d As WinForm.Label = Forms("窗口1").Controls("Label2")
Dim hj As WinForm.Label = e.Form.Controls("Label3")
Dim f As WinForm.CheckBox = Forms("窗口1").Controls("CheckBox1")
Dim r As Row = Tables("表A").Current
If a.Value + 200 - 70 > 0
c.text = a.Value + 200 - 70
r("第四列") = c.text
Else
c.text = Nothing
r("第四列") = Nothing
End If
If c.text + 20 - 70 * 15> 0
b.text = c.text + 20 - 70 * 15
r("第二列") = b.text
Else
b.text = Nothing
r("第二列") = Nothing
End If
If b.Value + CDec(c.text)> 0
d.text = b.Value + CDec(c.text)
r("第五列") = d.text
Else
d.text = Nothing
r("第五列") = Nothing
End If
Dim a1 As Double = Val(CDec(c.text))
Dim a2 As Double = Val(CDec(d.text))
If a1 + a2 > 0
hj.text = a1 + a2
r("第六列") = hj.text
Else
hj.text = Nothing
r("第六列") = Nothing
End If
Dim a3 As Double = Val(CDec(a.Value) + CDec(b.Value))
MessageBox.Show(a3,"提示")