By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

Hiding Controls when a user logs in

P: 48
hello everyone

i have a main form with that needs to be accessed by all users but the users with limited permissions should not be able to see some of the controls on the form, but the controls should be visible when the administrator logs in. the controls consist of a few text boxes and a combo box. any idea on how to do this? thank you
Sep 22 '08 #1
Share this Question
Share on Google+
2 Replies


P: 53
I usually use me.<controlname>.visible = True / False within a select statement in the onload event of a form.

something like

Expand|Select|Wrap|Line Numbers
  1. Select Case <AccessRights>. (dlookup if in table) or (look to control)
  2. Case is = "Admin"
  3. me.controlname.visible = True
  4. Case else
  5. me.controlname.visible = false
  6. End Select
  7.  
hope this helps

Leon
Sep 22 '08 #2

P: 48
hi
thank you so much Leon, its helped me a great deal
have a good day
Sep 22 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.