如图:
此主题相关图片如下:360截图1825082911214695.png

当我在窗口的文本框中录入进行筛选。如果输入的编号没在表中的范围,应该筛选结果是没有。现在我不知道如何跳出循环语句?
代码:
Dim txt As String = e.Form.controls("TextBox6").text
Dim tbl As Table = Tables("疾病编码库维护_Table1")
Dim txt1 As String
If txt.length =3 Then
For Each dr As DataRow In DataTables("疾病编码库").DataRows
txt1 = dr("ICD10编码")
Dim txt2() As String = txt1.Split("-")
If txt>= txt2(0) And txt <= txt2(1) Then
tbl.Filter = "[ICD10编码] ='" & txt1 & "'"
Exit For
End If
Next
' tbl.Filter = "[ICD10编码] like'" & txt & "'"
Else
tbl.Filter = ""
End If