Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
If e.DataCol.Name = "客户" Then
If e.NewValue = True Then
Dim a As new SQLCommand
Dim b As Row = Tables("出库").Current
Dim c As Double
a.C
a.CommandText = " select sum(合计金额) from {出库} where 客户 = '"& b("客户") &"' And 结款 = '未结' "
c = a.ExecuteScalar
b("欠款金额") = c
End If
End If
If e.NewValue = True Then
改为:
If e.DataRow.IsNull("客户") = false Then
因为客户列不应该是逻辑值,您这是按照帮助文件全盘照搬,没有修改代码!
或者:
If e.DataCol.Name = "客户" Then
If e.DataRow.IsNull("客户") Then
Messagebox.Show("对不起,客户列为空!")
else
Dim a As new SQLCommand
Dim b As Row = Tables("出库").Current
Dim c As Double
a.C
a.CommandText = " select sum(合计金额) from {出库} where 客户 = '"& b("客户") &"' And 结款 = '未结' "
c = a.ExecuteScalar
b("欠款金额") = c
End If
End If
e.NewValue = True
我以为 修改后 是true
e.NewValue = True
我以为 修改后 是true
呵呵,只有逻辑列才会是true