If Filter > "" Then
DataTables("佣金明细").LoadFilter = Filter
DataTables("佣金明细").Load
End If
绿色这一段去掉
================================================================================
但是我想把用户的权限加进去,本来权限可以在项目属性里面设置 但我采用需要用的时候才加载该表,所以就有点糊涂了,不知道怎么来整合这两段代码了,请高手解决下 谢谢
'实现使不同分组加载不同行且实现分页加载
If User.Group = "行政部" Then
DataTables("佣金明细").LoadFilter = Filter
ElseIf User.Group = "一片区" Then
DataTables("佣金明细").LoadFilter = Filter & " and 所属区域 = '" & User.Group & "'"
ElseIf User.Group = "二片区" Then
DataTables("佣金明细").LoadFilter = Filter & " and 所属区域 = '" & User.Group & "'"
ElseIf User.Group = "三片区" Then
DataTables("佣金明细").LoadFilter = Filter & " and 所属区域 = '" & User.Group & "'"
ElseIf User.Group = "店面经理" Then
DataTables("佣金明细").LoadFilter = Filter & " and 店面经理 = '" & User.Name & "'"
ElseIf User.Name = "开发者" Then
DataTables("佣金明细").LoadFilter = Filter
Else
DataTables("佣金明细").LoadFilter = Filter & " and 置业顾问 = '" & User.Name & "'"
End If
DataTables("佣金明细").LoadTop = 20
DataTables("佣金明细").LoadPage = 0
DataTables("佣金明细").Load