Dim txt As String = e.sender.Text
If txt > ""
txt = "'%" & txt & "%'"
Dim dr As DataRow
Dim po As Integer
po = Tables("上分_table1").FindRow("[考号] Like" & txt)
If po >= 0 Then '如果找到
Tables("上分_table1").Position = po '选定
Else
Tables("上分_table1").Position = 0
MessageBox.show("该考号在所选学生范围内不存在")
e.sender.text = ""
End If
End If