以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  加载代码合并成一个  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=137086)

--  作者:有点甜
--  发布时间:2019/6/27 21:53:00
--  
Dim filter
With DataTables("销售报价内贸_销售产品报价")
   
    If _UserName = "管理员" Then
        filter =  ""
    Else
        filter =  "[部门] = \'" & _UserGroup & "\'" \'一定要清除加载条件a
       
        filter &= " and [任务状态] = \'待分配\'"
        Dim str = ""
        For Each s As String In _UserGroup.split(",")
            str &= " or [部门] = \'" & s & "\'"
        Next
        filter &= " and (" & str.Substring(3) & ")"
    End If
    .LoadFilter = filter
    .LoadTop = 1000
    .LoadPage = 0
    .Load()
End With