感觉好烦啊
Tables("表C").StopRedraw
Dim Arys As List(Of String())
Arys = DataTables("表A").GetUniqueValues("委托编号 is not null", "委托编号","委托项目")
For Each Ary As String() In Arys
Dim s As String = Ary(1)
Dim Values() As String = s.split(",")
For i As Integer = 0 To Values.Length - 1
Dim Arys1 As List(Of String())
Arys1 = DataTables("表D").GetUniqueValues("委托项目 = '" & Values(i) & "'", "项目依据","项目明细","明细依据","项目单位")
For Each Ary1 As String() In Arys1
Dim dr As DataRow
dr = DataTables("表C").Find("委托编号 = '" & Ary(0) & "' and 委托项目 = '" & Values(i) & "' and 项目依据 = '" & Ary1(0) & "' and 项目明细 = '" & Ary1(1) & "' and 明细依据 = '" & Ary1(2) & "' and 项目单位 = '" & Ary1(3) & "'")
If dr Is Nothing Then
Dim r As Row = Tables("表C").AddNew()
r("委托编号") = Ary(0)
r("委托项目") = Values(i)
r("项目依据") = Ary1(0)
r("项目明细") = Ary1(1)
r("明细依据") = Ary1(2)
r("项目单位") = Ary1(3)
End If
Next
Next
Next
Tables("表C").ResumeRedraw