Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2007
    Location
    Harrisburg, PA
    Posts
    44

    Unanswered: Moving visible labels (or buttons) based on user rights

    I have a custom switchboard which has many buttons to different reports, forms, etc...

    Some users see all these buttons but others do not. When a user who cannot see all buttons opens the switchboard, all the buttons they can see are scattered around the page. How can I have the visible labels regroup so that the are all in a row one after the other?

    Ex. of user with all buttons:

    1) Bin Location Tracker
    2) Overstock Locations
    3) eBay Listings
    4) Marketing Campaigns
    5) Accounts Payable

    Ex. of user with restricted access:

    1) Bin Location Tracker


    4) Marketing Campaigns
    5) Accounts Payable

    Ex. Desired look of user with restricted access:

    1) Bin Location Tracker
    4) Marketing Campaigns
    5) Accounts Payable

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    One way would be to use an array\ table\ algorithm that stores\ derives the locations of each control sequentially. As you loop through your controls, you will want to set the top and left properties of each visible control to the values you get from your array\ table\ algorithm. Each time you do this you move on to the next set of location coordinates ready for the next visible control.

  3. #3
    Join Date
    Oct 2007
    Location
    Harrisburg, PA
    Posts
    44
    Could you give me an example of this? What you are talking about is uncharted territory for me... Sorry.

    Maybe even an Access example file if it is not too much trouble?

    Thank you.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Sorry Andy - it is a little too involved for me to throw something together especially as much of the code will be stuff you have already. Perhaps post what you have now and I\ someone else might get time to edit that.

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    An alternative might be to disable the buttons the user cannot access rather than setting them to invisible.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Apr 2004
    Location
    Kingsland, Georgia
    Posts
    231
    or create a different form for each user group with only their buttons arranged just so, and show whichever one they're in. hey..

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Poots suggstion is fine.. but I'd suggest instead you compromise and consider the persons membership of a group in the workgroup file.
    allocate buttons/forms or reports based on group membership. query if the curretnuser (network userID purleas) is a member of the required workgroup, and take appropriate action. mind you its often a good policy to also implement the validaton code in the form/reports on open events ust in case you forget to apply the same security logic if its called form another lcoation. its sounds a lot of work.. it isn't.. you write a generic function that returns a yes/no answer. I think the last itme I did that was soemthign like
    ValidateUser(UserID,RequestedAction,RequestedAcces s) as boolean
    where
    the UserID was the network logon (I don't trust CurrentUser)
    the RequestedAction was add/delete/edit/view
    the RequestedAccess was the calling programs minimum requirement

    sometimes the return value was integer (0 or less indicated fail) +1,2,3,4 equated to an enumeration which defined what the user could do in that report, or form. ie 1 may be view,2 edit,3 add, 4 change. Ive also implemented a stealth mode which deliberately obfuscated data in reports to embarass the sticky fingered (so much nicer when they have crud, rahter than NO, data to hawk around to their new employers)

    in terms of a design stylistic the jury's ut on wheather to show or enable options.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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