以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  查找问题?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=89204)

--  作者:zch1104
--  发布时间:2016/8/17 11:15:00
--  查找问题?

  查找:是通过产品编号来实现的(其中有2个品种 J6和J6+)每次查询时都是一起出来,能不能把它分开查询呢?

 

原来写的代码如下

 

Dim Filter As String
With e.Form.Controls("TextBox1")
    If .Value IsNot Nothing Then
        Filter = "产品编号 like \'%" & .Value & "%\'"
    End If
End With
If Filter > "" Then
    e.Form.Controls("Table2").Table.Filter = Filter
End If

 

 

 


--  作者:大红袍
--  发布时间:2016/8/17 11:24:00
--  
Dim Filter As String
With e.Form.Controls("TextBox1")
    If .Value IsNot Nothing Then
        Filter = "产品编号 = \'" & .Value & "\'"
    End If
End With
If Filter > "" Then
    e.Form.Controls("Table2").Table.Filter = Filter
End If