以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=70959)

--  作者:cjz7120641
--  发布时间:2015/7/2 10:49:00
--  [求助]
Dim Filter As String
With e.Form.Controls("DateTimePicker1")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        
        Filter = Filter & "购买日期 >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("DateTimePicker2")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        
        Filter = Filter & "购买日期 <= #" & .Value & "#"
    End If
End With
With e.Form.Controls("ComboBox3")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        
        Filter = Filter & "导购 = #" & .Value & "#"
    End If
End With
If Filter > "" Then
    Tables("销售订单明细").Filter = Filter
End If
请问下这个错在哪?前面两个我试了没问题 第三个错在哪?


--  作者:大红袍
--  发布时间:2015/7/2 10:57:00
--  
With e.Form.Controls("ComboBox3")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        
        Filter = Filter & "导购 = \'" & .Value & "\'"
    End If
End With

--  作者:cjz7120641
--  发布时间:2015/7/2 11:02:00
--  
谢谢 问题解决了