Results 1 to 3 of 3

Thread: Dynamic Menus

  1. #1
    Addicted Member Rohan_Powle's Avatar
    Join Date
    Mar 00
    Location
    Mumbai,maharashtra.India
    Posts
    173

    Dynamic Menus

    Hi there,
    Our company is making a Small ERP Package In-House
    Database Designer Suggested to integrate all departments in the same VB File and make dynamic menus, which will change as per the Department login. Is this sounds a good idea?

    What I understood frm this is to Show & hide menus as per the login? Pls give me some tips on this...
    "Trouble Gives Experience & Experience Gives Wisdom."
    (accept troubles as they come to become more wise in life)
    - Regards Rohan

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 00
    Location
    Excel Hell!
    Posts
    4,895

    Hi

    I've done this.

    Its wicked on access and fiddled to work on VB.

    You will need to first decide how you are going to rate people.

    Developer gets everything no matter what.
    User
    - Read Only
    - Update
    - Admin (?)

    Then you need a table of the menu items, and a security code/id...
    Also a list of user IDs vs Security IDs... and levels...

    Then a sub to check whether the user can see the item or not (depending on whether they have the security). In vb you just put the control code something like : mnuSearchRecs.Visible=False
    In access it was more difficult but I developed a neat 2 classes coding which creates the items and using the table makes them visible or not.

    Essentially, set all items to visible, on loading the form, check the users ID and loop through making the top level visible or invisible etc and so on until the menu structure is done.

    VB I had to fiddle and change because I couldn't create the controls... Maybe later. So I used a predefined menu, and made the items visible or not in the checking loop. Had to list all the menu controls in code though, so make sure you spell correctly first time.

    If you are interested in the Access coding I should be able to put it up with its table and the splash screen etc... if its too big I'll email you.

    You may want to look disabling controls, especially if you are using a database be you need to connect to first...

    Ideas... Ideas

    Oh yeah - you need to have some code on the forms to disable the Update buttons if they only have read only or cancel opening the forms if they don't have at all (although this shouldn't hapen as you have done the menu items). And for tweaking screens possibly use the admin level for 'hidden' buttons. Same goes for Developer level, you can hide buttons. And when the normal user comes into the database they should NOT be able to see the developer menu.


    Regards

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3
    Addicted Member Rohan_Powle's Avatar
    Join Date
    Mar 00
    Location
    Mumbai,maharashtra.India
    Posts
    173

    Thankz for replying


    I want it in VB
    But if u could send me the access file it will help & give me some idea..
    "Trouble Gives Experience & Experience Gives Wisdom."
    (accept troubles as they come to become more wise in life)
    - Regards Rohan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •