以文本方式查看主题

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

--  作者:李木
--  发布时间:2014/6/18 17:23:00
--  [求助]
老师这个代码怎么改  老是出错啊
图片点击可在新窗口打开查看此主题相关图片如下:查询.png
图片点击可在新窗口打开查看

--  作者:Bin
--  发布时间:2014/6/18 17:25:00
--  
代码呢? 出什么错?

严格按照帮助做不会有问题


--  作者:李木
--  发布时间:2014/6/18 18:01:00
--  
Dim Filter As String
With e.Form.Controls("ComboBox1")
    If .Value IsNot Nothing Then
        Filter = "类别 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("ComboBox2")
    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 & "商品名称 like \'*" & .Value & "\'"
    End If
End With
With e.Form.Controls("ComboBox4")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "供货厂家 = \'" & .Value & "\'"
    End If
End With
With e.Form.Controls("ComboBox5")
    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

--  作者:有点甜
--  发布时间:2014/6/18 19:20:00
--  
 出什么问题?