-- 副表
For Each dr55 As DataRow In DataTables("表权限").sqlSelect("\',\'+角色用户+\',\' like \'%," & _userGroup & ",%\' " )
If dr55.Isnull("表名") AndAlso dr55.Isnull("列名") Then
For Each t As Table In Tables
t.Visible = Not dr55("权限表不可见")
t.AllowEdit = Not dr55("权限表不可编缉")
Next
Else If dr55.isnull("列名") Then
Tables(dr55("表名")).Visible = Not dr55("权限表不可见")
For Each c As Col In Tables(dr55("表名")).Cols
c.Visible = Not dr55("权限表不可见")
c.AllowEdit = Not dr55("权限表不可编缉")
Next
Else
Tables(dr55("表名")).Visible = Not dr55("权限表不可见")
For Each c As Col In Tables(dr55("表名")).Cols
If dr55("列名") = c.name OrElse dr55("列名") Like c.name & ",*" OrElse dr55("列名") Like "*," & c.name & ",*" OrElse dr55("列名") Like "*," & c.name Then
c.Visible = Not dr55("权限表不可见")
c.AllowEdit = Not dr55("权限表不可编缉")
End If
Next
End If
Next
这个权限对副表不起做用
Tables("窗口1_Table1").SetColVisibleWidth(Tables("订单").GetColVisibleWidth())
可不可以像这个代码跟着订单表锁定列
[此贴子已经被作者于2021/7/11 16:32:14编辑过]