按列子改的可视化权限,不起作用是怎么回事呢
全局变量:
Public _UserGroup As String
AfterOpenProject:
For Each dr As DataRow In DataTables("权限表").Select("用户组 = '" & _UserGroup & "'" )
If dr.IsNull("列名") Then
For Each t As Table In Tables
If t.DataTable.Name = dr("表名") Then
t.Visible = Not dr("不可见")
t.AllowEdit = Not dr("不可编辑")
End If
Next
Else
For Each t As Table In Tables
If t.DataTable.Name = dr("表名") Then
For Each c As Col In t.Cols
If c.Name = dr("列名") Then
c.Visible = Not dr("不可见")
c.AllowEdit = Not dr("不可编辑")
End If
Next
End If
Next
End If
Next