这段,改成
f Filter > "" Then
DataTables("佣金明细").LoadFilter = Filter
DataTables("佣金明细").Load
End If
改成
If Filter > "" Then
If User.Group = "行政部" Then
filter = filter
ElseIf User.Group = "一片区" Then
filter = filter & " and 所属区域 = '" & User.Group & "'"
ElseIf User.Group = "二片区" Then
filter = filter & " and 所属区域 = '" & User.Group & "'"
ElseIf User.Group = "三片区" Then
filter = filter & " and 所属区域 = '" & User.Group & "'"
ElseIf User.Group = "店面经理" Then
filter = filter & " and 店面经理 = '" & User.Name & "'"
ElseIf User.Name = "开发者" Then
filter = filter
Else
filter = filter & " and 置业顾问 = '" & User.Name & "'"
End If
DataTables("佣金明细").LoadTop = 20
DataTables("佣金明细").LoadPage = 0
DataTables("佣金明细").LoadFilter = Filter
DataTables("佣金明细").Load
End If