在B表中改动A表的现金流科目,在B表的DataColChanged事件中写了如下代码:
If e.DataCol.Name= "现金流科目" Then Dim dr As DataRow dr = DataTables("A表").SQLFind("序号 = '" & e.DataRow("序号") & "'and 科目代码 = '"& e.datarow("科目代码") & "'")
MessageBox.Show(1) 此步跳出 If dr IsNot Nothing Then MessageBox.Show(2) 此步未跳出 dr("现金流科目") = e.DataRow("现金流科目")MessageBox.Show(3) dr.Load End IfEnd If