--
测试过可以通过了不知这样行不行Select Case e.DataCol.Name
Case "正单号"
If e.NewValue Is Nothing Then
e.DataRow("产品名称") = Nothing
Else
Dim dr As DataRow
dr = DataTables("压铸计件").Find("[正单号] = \'" & e.NewValue & "\'")
If dr IsNot Nothing
e.DataRow("产品名称") = dr("产品名称")
End If
End If
Case "产品名称"
If e.NewValue Is Nothing Then
e.DataRow("数控工序1") = Nothing
e.DataRow("数控工序2") = Nothing
e.DataRow("数控工序3") = Nothing
e.DataRow("数控工序4") = Nothing
Else
Dim dr As DataRow
dr = DataTables("货物工序单价").Find("[产品名称] = \'" & e.NewValue & "\'")
If dr IsNot Nothing
e.DataRow("数控工序1") = dr("数控1工序")
e.DataRow("数控工序2") = dr("数控2工序")
e.DataRow("数控工序3") = dr("数控3工序")
e.DataRow("数控工序4") = dr("数控4工序")
End If
End If
End Select