Dim idx As String = "-1," For Each dr As DataRow In DataTables("表A").DataRows If DataTables("表B").find("编码 = '" & dr("编码") & "' and 金额 = '" & dr("金额") & "'") Is Nothing Then idx &= dr("_Identify") & "," End If Next Tables("表A").Filter = "_Identify in (" & idx.trim(",") & ")"