Dim count As Integer = 5 Dim str As String = "" For Each r As DataRow In DataTables("表a").Select("", "_Sortkey desc") If count = 0 Then Exit For End If str &= r("_Identify") & "," count -= 1 Next
Tables("表a").Filter = "_Identify in (" & str.Trim(",") & ")"