fill填充无法去重,这种方式复制数据才可以:http://www.foxtable.com/webhelp/scr/1533.htm
Dim Cols1() As String = {"GSSAG_PO","Customer"}
Dim d As Date = Forms("Mainfrm").Controls("startdate").value
For Each dr1 As DataRow In DataTables("Orderlist").Select("[Orderdate] = #" & d & "#")
Dim dr2 As DataRow = DataTables("Packinglist").Find("GSSAG_PO='" & dr1("GSSAG_PO") & "' and Customer='" & dr1("Customer") & "'")
If dr2 IsNot Nothing Then
Dim Result As DialogResult
Result = MessageBox.Show("重复,是否继续?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
For i As Integer = 0 To Cols1.Length -1
dr2(Cols2(i)) = dr1(Cols1(i))
Next
dr2("Orderdate") = d
End If
End If
Next