自己改一改
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(",") & ")"
[此贴子已经被作者于2014-7-6 20:51:20编辑过]