Foxtable(狐表)用户栏目专家坐堂 → [求助]


  共有2460人关注过本帖树形打印复制链接

主题:[求助]

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


加好友 发短信
等级:幼狐 帖子:86 积分:794 威望:0 精华:0 注册:2015/8/31 11:01:00
[求助]  发帖心情 Post By:2015/10/23 22:49:00 [显示全部帖子]

是如果有多个文本控件,应该乍样?是这样往后递加吗?

Dim filter As String = ""
Dim txt As String = e.Form.Controls("TextBox1").TEXT
If txt > "" Then
    txt = "'%" & txt & "%'"
    Filter = "部门名称 Like " & txt
End If

Dim txt1 As String = e.Form.Controls("TextBox2").TEXT
If txt1 > "" Then
    txt1 = "'%" & txt1 & "%'"
    If Filter > "" Then
        Filter = Filter & " and 专业 Like " & txt1
    Else
        Filter = "专业 Like " & txt1
    End If
End If

 

Dim txt2 As String = e.Form.Controls("TextBox3").TEXT
If txt2 > "" Then
    txt2 = "'%" & txt2 & "%'"
    If Filter > "" Then
        Filter = Filter & " and 专业 Like " & txt1 & " and 学历 Like " & txt1

    Else
        Filter = "学历 Like " & txt2
    End If
End If


If Filter > "" Then
    Tables("机构").Filter = Filter
End If


 回到顶部