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
|