If MainTable.Name ="表B" Then
DataTables("表B").DeleteFor("")
Dim a As List(of String) = DataTables("表A").GetValues("第一列")
For Each b As String In a
Dim dc As DataRow = DataTables("表B").AddNew()
dc("第一列") = b
Dim drs As List(of DataRow) = DataTables("表A").Select("[第一列] = '" & b & "'","第二列")
For i As Integer = 0 To drs.Count -1
Dim s() As String = {"第二列","第三列","第四列","第五列","第六列","第七列"}
Dim dt As DataRow = DataTables("表B").find("[第一列] = '" & drs(i)("第一列") & "'")
dt(s(i)) = drs(i)("第二列")
Next
Next
End If