我是在登录窗口位置加入类似一下的窗口代码,如何在动态加载的时候也能够保证下面的权限呢?
'关怀信息表过滤与表窗口加载
Dim filtergh As String
If _Role = "销售部同事" Then
Filtergh = "BelongTeam= '公海' Or BelongUser = '" & _UserName & "'"
Else If _Role = "销售部经理" Then
Filtergh = "BelongTeam = '" & _department & "' Or BelongTeam= '公海'"
Else If _Role = "外包部同事" Then
Filtergh = "BelongTeam = '" & _department & "' And BelongUser = '" & _UserName & "'"
Else If _Role ="超级管理员" Or _Role= "公司总经理" Then
Filtergh = ""
Else
Filtergh = "BelongUser = '还想加载数据想太多'"
End If
'Forms("关怀信息分页").Show()
DataTables("GuanHuai").LoadFilter = filtergh
DataTables("GuanHuai").Load