以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  拼接语句  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=90618)

--  作者:huhu
--  发布时间:2016/9/18 16:09:00
--  拼接语句
请问红色的代码怎么改?
Select Case user.Group
        Case  "录入","审核","协议一组","协议二组","交换组","R驱动组","S驱动组","EPON组","ONU组","网管组","网络组","路由组","PTN应用组","链路组","测试epon","测试switch","测试router"
            If kh.text = "" Then
                DataTables("临时版本跟踪表").LoadFilter = "需求提交时间 > \'" & startdate.Value & "\' And 需求提交时间 < \'"  & enddate.value.AddDays(1) & "\' & "and DataTables("临时版本跟踪表").LoadFilter""
            Else
                DataTables("临时版本跟踪表").LoadFilter = "需求提交时间 > \'" & startdate.Value & "\' And 需求提交时间 < \'"  & enddate.value.AddDays(1) & "\' & "and DataTables("临时版本跟踪表").LoadFilter" & " And 客户 = \'" & kh.text & "\'"
            End If
    End Select

--  作者:有点蓝
--  发布时间:2016/9/18 16:20:00
--  
Select Case user.Group
    Case  "录入","审核","协议一组","协议二组","交换组","R驱动组","S驱动组","EPON组","ONU组","网管组","网络组","路由组","PTN应用组","链路组","测试epon","测试switch","测试router"
        Dim filter = DataTables("临时版本跟踪表").LoadFilter
        If filter > "" Then filter &= " and "
        If kh.text = "" Then
            DataTables("临时版本跟踪表").LoadFilter = filter & "需求提交时间 > \'" & startdate.Value & "\' And 需求提交时间 < \'"  & enddate.value.AddDays(1) & "\'"
        Else
            DataTables("临时版本跟踪表").LoadFilter = filter & "需求提交时间 > \'" & startdate.Value & "\' And 需求提交时间 < \'"  & enddate.value.AddDays(1) & "\' and  客户 = \'" & kh.text & "\'"
        End If
End Select