Foxtable(狐表)用户栏目专家坐堂 → 关键字筛选


  共有2254人关注过本帖平板打印复制链接

主题:关键字筛选

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


加好友 发短信
等级:幼狐 帖子:108 积分:671 威望:0 精华:0 注册:2021/9/24 17:07:00
  发帖心情 Post By:2021/9/30 16:05:00 [只看该作者]

Dim Filter As String
With e.Form.Controls("店铺名称1")
    If .Value IsNot Nothing Then
        Filter = "店铺名称 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("产品类别1")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "产品类别 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("处理人1")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "处理人 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("开始1")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "记录时间 >= #" & .Value & "#"
    End If
End With
With e.Form.Controls("结束1")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "记录时间 <= #" & .Value & "#"
    End If
End With
Dim txt1 As String = e.Form.Controls("TextBox4").Text
Dim tbl As Table = Tables("table_3")
If txt1 = "" Then
    tbl.Filter = ""
Else
    Dim Values() As String
    Values = txt1.split(",")
    Dim f As String
    For Index As Integer = 0 To Values.Length - 1
        If f > "" Then f = f & " or "
        Dim txt As String =Values(Index)
        txt = "'%" & txt & "%'"
        f = f & "店铺名称 Like " & txt & " Or 单号 Like " & txt & " Or 处理人 Like " & txt & " Or 发货仓库 Like" & txt & " Or 物流公司 Like" & txt & " Or 赠送SKU Like" & txt & " Or 客户姓名 Like" & txt & " Or 系统单号 Like" & txt & " Or 产品类别 Like " & txt & " Or 配件SKU Like " & txt & " Or 产品SKU Like " & txt  & " Or 联系方式 Like " & txt & " Or 追踪号 Like " & txt & " Or 处理方式 Like " & txt & " Or 备注 Like " & txt & " Or 回访 Like" & txt & " Or 状态 Like" & txt & " Or 寄送地址 Like " & txt & " Or [状况描述 原因] Like " & txt
        
    Next
    
    tbl.Filter = f
End If

If Filter > "" Then
    Tables("table_3").Filter = Filter
End If

 回到顶部
总数 17 1 2 下一页