Dim txt As String = e.Form.controls("TextBox6").text Dim tbl As Table = Tables("疾病编码库维护_Table1") Dim txt1 As String If txt.length =3 Then Dim found As Boolean = False 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 & "'" found = True Exit For End If Next If found Then tbl.Filter = "[ICD10编码] like'" & txt & "'" Else msgbox("没找到") End If Else tbl.Filter = "" End If
|