第二种方法应该可以,不过应该稍微改一下,排除掉本行:
If e.DataCol.Name = "客户名称" Or e.DataCol.Name = "品名" Then
Dim dr As DataRow
Dim Filter As String
Filter = "[客户名称] = '" & e.DataRow("客户名称") & "' And [品名] = '" & e.DataRow("品名") & "' And [_Identify] <> " & e.DataRow("_Identify")
dr = DataTables("订单明细").Find(Filter ,"日期 Desc")
If dr IsNot Nothing Then
e.DataRow("价格") = dr("价格")
End If
End If
如果还不行,做个例子发上来。