下面的这段代码在执行时,不管是否能够查询得到“症状”,都要显示提示对话框“未找到所述症状情况!”。按道理,应该在查询成功后,不应该出现第二个提示对话框啊。
请各位老师帮忙看看,问题到底出在哪里?不胜感激。
Dim Filter As String
With e.Form.Controls("症状描述")
If .Value Is Nothing Then
MessageBox.Show("请输入症状情况!", "提示")
Else
If Filter = "症状 Like '%" & .Value & "%'" Then
Else
MessageBox.Show("未找到所述症状!请重新输入!", "提示")
End If
End If
End With
Dim cmb As WinForm.ComboBox = e.Form.Controls("疾病名")
Dim str As String = e.Form.Controls("症状描述").Text
e.Form.Controls("疾病名").ComboList = DataTables("jbmb").GetComboListString("疾病名","症状 Like '%" & str & "%'")