以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  不等于略过空值怎么解决  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=109603)

--  作者:zoudezhao
--  发布时间:2017/11/15 15:17:00
--  不等于略过空值怎么解决
Dim Filter As String
With e.Form.Controls("_mtxz")
    If .Value IsNot Nothing Then
        Filter = "媒体 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("TextBox2")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "地址 like \'%" & .Value & "%\'"
    End If
End With
With e.Form.Controls("_khlx")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "客户类型 = \'" & .Value & "\'"
    End If
End With
If Filter > "" Then
            DataTables("表A").loadFilter = Filter & " And 回访人 Is Null " & " And " & " [客户类型]  <> \'休眠客户\'"
            DataTables("表A").Load
End if
请问下。这段代码会略过客户类型为空的数据应该怎么改才对。。

--  作者:有点甜
--  发布时间:2017/11/15 15:23:00
--  
DataTables("表A").loadFilter = Filter & " And 回访人 Is Null " & " And " & " ([客户类型]  <> \'休眠客户\' or [客户类型] is null)"
--  作者:zoudezhao
--  发布时间:2017/11/15 15:25:00
--  
感谢甜老师