参考:
http://www.foxtable.com/webhelp/topics/2481.htm
If e.DataCol.Name = "工序编号" Then
Dim dr As DataRow
dr = e.DataTable.Find("工序编号 = '" & e.NewValue & "' and 订单编号='" & e.datarow("订单编号") & "'")
If dr IsNot Nothing Then
MessageBox.Show("此订单号的工序编号已经存在!")
e.Cancel = True
End If
End If