If e.DataCol.Name = "IO" OrElse e.DataCol.Name = "供应商编号" Then Dim dr As DataRow Dim Filter As String Filter = "[IO] = '" & e.DataRow("IO") & "' And [供应商编号] = '" & e.DataRow("供应商编号") & "'" dr = DataTables("生产批号").Find(Filter) If dr IsNot Nothing Then e.DataRow("订购单编号") = dr("订购单编号") End If End If