Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to list all items in my Menu

Status
Not open for further replies.

suoirotciv

Programmer
Dec 3, 2002
205
PH
Hi there

Just want to know if there is a way that i can list all items in my menu that was already created using the menu editor.

I need to know this coz I need to create an "access this menu maintenance". It's getting complicated here since i have lots of menus. Right now, I have a level of access in each user (Username, LevelOfAccess (1-9)). But, the managers here are requesting that a particular menu will be access only by a specific user and not by another user even if they have same level of access. And its really getting complicated.

So I want to create a menu access maintenance that when a i can just click everything that can be accessed by any specific user and just save it in a table. And when the user login the application i will just check that table and load only those selected menu.

Hope you can help me on this.

Thanks a lot.

Please pardon the grammar.
Not good in english.
 
You could validate the user's permission on the Click event for the toplevel menu:

Code:
Private Sub mnuMyTopLevelMenu_Click()
    'Get permissions
    'If the current user passes your permission check
        'For each lower level menu item: menuitem.Enabled = True
    'Else
        'For each lower level menu item: menuitem.Enabled = False
End Sub

This way, the user's permissions are validated each time they click on the menu. If they pass the check, the menu's subitems are enabled and clickable; otherwise, they're not.

You could duplicate this with the .Visible property if you want to disappear them completely.
 
thank you for your reply.

but what i really need is to list/populate all my menus that was created using menu editor - to get the Caption and Name.

Please pardon the grammar.
Not good in english.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top