I have a form that is my main menu. From the menu you can get to other parts of the program by clicking on labels. You access the Main menu from a user log on screen – user name is stored. By default all labels are not visible. Users are assigned groups in a grp_members table. What I want to do is make he labels visible if the user logging on is a member of that group.
2 tables involved user_log and grp_members. The user log holds one record only(table held locally) grp_members holds all users and the groups they are assigned to.
I have SQL that will identify if the user is a member of each group. This could run for each label. If the result is true then make label visible. I have a problem getting the SQL in the form to link this to a label.
SQL = "SELECT Grp_Members.Group
FROM user_log INNER JOIN Grp_Members ON user_log.user = Grp_Members.User WHERE (((Grp_Members.Group)='Admin'));"
By using functions in the Control Source of the text box. It would be a pretty complex Control Source though... I think... very hard to get specific here as I don't know the details of your login procedure.
I'd still be going down the avenue of using VBA to enable only those labels the logged in user should have access to.