Foxtable(狐表)用户栏目专家坐堂 → 查询


  共有3989人关注过本帖树形打印复制链接

主题:查询

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


加好友 发短信
等级:七尾狐 帖子:1553 积分:10501 威望:0 精华:0 注册:2013/6/8 16:19:00
查询  发帖心情 Post By:2021/7/29 17:19:00 [显示全部帖子]

Dim Filter As String
With e.Form.Controls("店名")
    If .Value IsNot Nothing Then
        Filter = " '," & .Value & ",' like '%,' +店名汉字+',%'"
    End If
End With
With e.Form.Controls("对账品名")
    If .Value IsNot Nothing Then
        If Filter > "" Then
            Filter = Filter & " And "
        End If
        Filter = " '," & .Value & ",' like '%,' +对账品名+',%'"
    End If
End With
With e.Form.Controls("对账品类")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = " '," & .Value & ",' like '%,' +对账品类+',%'"
    End If
End With
With e.Form.Controls("年")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "年 = '" & .Value & "'"
    End If
End With
With e.Form.Controls("月")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "月 = '" & .Value & "'"
    End If
End With
If Filter > "" Then
    DataTables("盘点明细").LoadFilter = Filter
    DataTables("盘点明细").Load()
End If



店名单值,对账品名填入值,查询会查岀全部店名

 回到顶部