Foxtable(狐表)用户栏目专家坐堂 → 筛选问题


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

主题:筛选问题

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/11/17 17:35:00 [显示全部帖子]

写到TextChanged事件去

 

Dim Filter As String
With e.Form.Controls("combobox1")
    If .text <> Nothing Then
        Filter = "对应客户 = '" & .text & "'"
    End If
End With
With e.Form.Controls("combobox2")
    If .text <> Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter &  "部门 = '" & .text & "'"
    End If
End With
With e.Form.Controls("combobox14")
    If .text <> Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "客户负责人 = '" & .text & "'"
    End If
End With

If Filter > "" Then
    Tables("联系_table1").Filter = Filter
End If


 回到顶部