Foxtable(狐表)用户栏目专家坐堂 → 筛选结果


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

主题:筛选结果

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


加好友 发短信
等级:六尾狐 帖子:1336 积分:9024 威望:0 精华:0 注册:2017/10/12 13:00:00
筛选结果  发帖心情 Post By:2018/4/16 22:38:00 [只看该作者]

明明只筛选项目名称中对应包含2.1的某节点,但是其他项目名称的也出来了,如图

 

Dim Filter As String
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
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("结束日期")
    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
With e.Form.Controls("节点代号1")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = "节点代号 like '%" & .Value & "%'"
    End If
End With
e.Form.controls("节点明细").Table.DataTable.LoadPage = 0
e.Form.controls("节点明细").Table.DataTable.LoadFilter = Filter
e.Form.controls("节点明细").Table.DataTable.Load


图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:23820 积分:121504 威望:0 精华:7 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/4/16 22:53:00 [只看该作者]


 回到顶部
帅哥哟,离线,有人找我吗?
nuoyan88
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1336 积分:9024 威望:0 精华:0 注册:2017/10/12 13:00:00
  发帖心情 Post By:2018/4/17 8:18:00 [只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:1.jpg
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:2.jpg
图片点击可在新窗口打开查看

 回到顶部
帅哥,在线噢!
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:74077 积分:371513 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/17 8:48:00 [只看该作者]

改成

 

With e.Form.Controls("节点代号1")
    If .Value IsNot Nothing Then
        If Filter >"" Then
            Filter = Filter & " And "
        End If
        Filter = Filter & "节点代号 like '%" & .Value & "%'"
    End If
End With


 回到顶部