DataColChanged事件
Dim dr_a As DataRow
dr_a=DataTables("表B").Find("分类码='" & e.DataRow("分类码") & "'")
If dr_a.IsNull("分类码")=False Then '如果找得到专业分类码为a的行
Dim Total_a As Double
Total_a = DataTables("表A").Compute("Sum(金额)", "分类码='" & e.DataRow("分类码") & "'")
dr_a("分类金额")=Total_a
End If