-- 作者:程兴刚
-- 发布时间:2010/10/16 20:17:00
--
或者:
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
|