Dim num As Integer = e.Form.controls("ComboBox1").Text Dim idx As Integer = 1 Dim idxs As String = "" For Each dr As DataRow In Datatables("表A").Select("", "日期 desc") If idx > num Then Exit For End If
idx += 1 idxs &= dr("_Identify") & "," Next
Tables("表A").Filter = "_Identify in (" & idxs.TrimEnd(",") & ")"