If e.DataCol.name = "物料编号"
If e.DataRow.IsNull("物料编号") = False
Dim dr As DataRow = DataTables("其他出入").Find("物料编号 = '" &e.DataRow("物料编号") & "'","_Identify Desc")
If dr IsNot Nothing Then
e.DataRow("库存数量") = dr("库存数量") + e.DataRow("初始数据")
Else
e.DataRow("库存数量") = Nothing
End If
Else
e.DataRow("库存数量") = Nothing
End If
End If
以上代码每次填写初始数据的时候库存数量都不会发生变化,要等其他出入表里面的库存数量发生变化时才变化,这样很不方便,请老师帮忙,怎样才能初始数据发生变化的时候,当前表的库存数量也跟着发生变化啊