If e.DataCol.Name = "产品编号" Then
If e.NewValue Is Nothing Then
e.DataRow("品名") = Nothing
e.DataRow("型号") = Nothing
e.DataRow("规格") = Nothing
e.DataRow("单价") = Nothing
Else
Dim dr As DataRow
dr = DataTables("产品").Find("[产品编号] = '" & e.NewValue & "'")
If dr IsNot Nothing
e.DataRow("品名") = dr("品名")
e.DataRow("型号") = dr("型号")
e.DataRow("规格") = dr("规格")
e.DataRow("单价") = dr("单价")
Dim d2 As DataRow = DataTables("供货商表").Find("[供货商编码] = '" & dr("供货商编码") & "'")
If d2 IsNot Nothing
e.DataRow("公司名") = d2("公司名")
End If
End If
End If
End If