if e.Datacol.name = "结账" then
Dim T as String
Dim dr1,dr2 as DataRow
dr1 = e.DataRow
If dr1("结账") = True Then
If dr1("客户ID") is Nothing Then
MessageBox.Show("请输入客户ID!", "提示")
Else
T = "客户ID = " & dr1("客户ID")
dr1.Locked = True
for each dr2 in DataTables("表B").select(T)
dr2("结账") = True
Next
for each dr2 in DataTables("表C").select(T)
dr2("结账") = True
Next
End If
End If
End If
[此贴子已经被作者于2008-12-7 17:59:24编辑过]