以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 用户权限 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=88597) |
-- 作者:约翰舒 -- 发布时间:2016/8/5 15:05:00 -- 用户权限 设置好用户权限后,在打开表的情况下切换用户,加载时会从前一用户的可见表中筛选新用户的可见表,而不是从总表中筛选,如何解决? loadusersetting事件的部分代码为 Select Case User.Name Case "甲" Tables("b2").Visible = False End Select Select Case User.Name Case "乙" Tables("b1").Visible = False End Select
|
-- 作者:大红袍 -- 发布时间:2016/8/5 15:12:00 -- 你项目事件的代码,都贴出来看看。 |
-- 作者:约翰舒 -- 发布时间:2016/8/5 15:40:00 -- 帮忙看看吧 Select Case User.Name Case "甲" Tables("b2").Visible = False Tables("b3").Visible = False Tables("b4").Visible = False Tables("b5").Visible = False Tables("b6").Visible = False Tables("b7").Visible = False Tables("b8").Visible = False Tables("b9").Visible = False Tables("m2").Visible = False Tables("m4").Visible = False Tables("m5").Visible = False End Select Select Case User.Name Case "乙" Tables("b1").Visible = False Tables("b2").Visible = False Tables("b3").Visible = False Tables("b4").Visible = False Tables("b5").Visible = False Tables("b6").Visible = False Tables("b8").Visible = False Tables("b9").Visible = False Tables("m1").Visible = False Tables("m2").Visible = False Tables("m3").Visible = False Tables("m4").Visible = False Tables("m5").Visible = False End Select Select Case User.Name Case "丙" Tables("b1").Visible = False Tables("b2").Visible = False Tables("b3").Visible = False Tables("b4").Visible = False Tables("b5").Visible = False Tables("b6").Visible = False Tables("b7").Visible = False Tables("b8").Visible = False Tables("b9").Visible = False Tables("m1").Visible = False Tables("m2").Visible = False Tables("m3").Visible = False Tables("m4").Visible = False Tables("m5").Visible = False End Select Select Case User.Name Case "丁" Tables("b1").Visible = False Tables("b4").Visible = False Tables("b5").Visible = False Tables("b6").Visible = False Tables("b7").Visible = False Tables("b8").Visible = False Tables("b9").Visible = False Tables("m1").Visible = False Tables("m2").Visible = False Tables("m3").Visible = False Tables("m4").Visible = False Tables("m5").Visible = False End Select Select Case User.Name Case "戊" Tables("b1").Visible = False Tables("b7").Visible = False Tables("b8").Visible = False Tables("b9").Visible = False Tables("m1").Visible = False Tables("m3").Visible = False Tables("m4").Visible = False Tables("m5").Visible = False End Select Select Case User.Name Case "己" Tables("b1").Visible = False Tables("b4").Visible = False Tables("b5").Visible = False Tables("b6").Visible = False Tables("b7").Visible = False Tables("m1").Visible = False Tables("m2").Visible = False Tables("m3").Visible = False End Select Select Case User.Name Case "庚" Tables("b1").Visible = False Tables("b2").Visible = False Tables("b3").Visible = False Tables("b4").Visible = False Tables("b5").Visible = False Tables("b6").Visible = False Tables("b7").Visible = False Tables("b8").Visible = False Tables("b9").Visible = False Tables("m1").Visible = False Tables("m2").Visible = False Tables("m3").Visible = False Tables("m4").Visible = False Tables("m5").Visible = False End Select |
-- 作者:大红袍 -- 发布时间:2016/8/5 15:43:00 -- 可以先把所有的表都显示,再设置
For Each t As Table in Tables t.Visible = True Next |
-- 作者:大红袍 -- 发布时间:2016/8/5 15:44:00 -- 建议看看 http://www.foxtable.com/webhelp/scr/1600.htm
|
-- 作者:约翰舒 -- 发布时间:2016/8/5 15:50:00 -- 嗯嗯,可以了,非常感谢! |
-- 作者:cd_tdh -- 发布时间:2016/8/6 0:04:00 -- 你这一个人一个人的设置,要累死,人员有变动,新增加人员你又怎么办啊? |