Select Case via TreeView Node
Posted on 2006-07-06
Below is my current code. When a user selects the "Administrator" Caption in my treeview I want it
to block access unless the user is a manager. What is the best way to do this ?
I do already have code in place to pull the users network ID and place it in label29.caption
Need Msgbox displaying that access is not available unless label29.caption = manager1,manager2 or manager3...etc
Private Sub tvTreeView_NodeClick(ByVal Node As MSComctlLib.Node)
Select Case Node.Key
If Lable29.caption = "manager1", manager2 or manager3 expand Administrator Tree
else MsgBox " You do not have permission to access this module" (Or any other module under admin )
Case "Shared Files"
Case " Admin Reports" ' This is under the "Administrator" view, so I want it blocked as well
Code ??? Same as above I assume
Any help would be appreciated