Foxtable(狐表)用户栏目专家坐堂 → [讨论]查询的问题


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

主题:[讨论]查询的问题

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


加好友 发短信
等级:二尾狐 帖子:500 积分:5409 威望:0 精华:0 注册:2009/2/5 13:09:00
[讨论]查询的问题  发帖心情 Post By:2018/9/27 21:26:00 [显示全部帖子]

Dim Filter As String
With e.Form.Controls("ComboBox1")
    If .Value IsNot Nothing Then
        Filter = Filter & "时间 like '%" & .Value & "%'"
    End If
End With
With e.Form.Controls("cmbProduct")
    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("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("DateTimePicker1")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "截止日期 <= '" & .Value & "'"
    End If
End With

'     Tables("派工").Filter &= " and 交单 <> '取消'"    派工表有《交单列》,筛选时不显示   交单列 包含取消的取消的行

If Filter > "" Then
    DataTables("派工").LoadFilter = Filter
    DataTables("派工").Load()
End If

 

 

 派工表有《交单列》,筛选时 不显示   交单列 包含取消的取消的行


 回到顶部