Foxtable(狐表)用户栏目专家坐堂 → [求助]窗口筛选问题


  共有2020人关注过本帖平板打印复制链接

主题:[求助]窗口筛选问题

帅哥哟,离线,有人找我吗?
cqlwsam
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:五尾狐 帖子:1022 积分:7592 威望:0 精华:0 注册:2010/4/12 12:23:00
[求助]窗口筛选问题  发帖心情 Post By:2018/11/2 15:20:00 [只看该作者]

如图:

图片点击可在新窗口打开查看此主题相关图片如下: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


 回到顶部