alan_mitchell
Registered User.
- Local time
- Today, 13:46
- Joined
- Nov 25, 2008
- Messages
- 11
[FONT=Verdana, Arial, Helvetica]Hi,
Here's the situation.
I have some VB code (GetUserName) which pulls in the username of the user from the Windows API. I then have a table which contains the desired access levels for each employee. The fields are:
* EmployeeName (text)
* AllowedAccessToControlA? (yes/no)
* AllowedAccessToControlB? (yes/no)
* AllowedAccessToControlC? (yes/no)
So for example, Joe Bloggs might be allowed access to A and B but not C.
I now want to make controls on a form visible/not visible based on these access levels. So if the user is Joe Bloggs, I would want to make controls A and B visible, but control C invisible.
So if I have a text box which contains the current username, I think I'll need a way to look up the AccessToControl columns.
I can't think of an easy way to do this but I'm sure there must be one. I've tried searching on Google but it's hard when I don't know what to search for! Any ideas to point me in the right direction?
Thanks for your help!
Alan[/FONT]
Here's the situation.
I have some VB code (GetUserName) which pulls in the username of the user from the Windows API. I then have a table which contains the desired access levels for each employee. The fields are:
* EmployeeName (text)
* AllowedAccessToControlA? (yes/no)
* AllowedAccessToControlB? (yes/no)
* AllowedAccessToControlC? (yes/no)
So for example, Joe Bloggs might be allowed access to A and B but not C.
I now want to make controls on a form visible/not visible based on these access levels. So if the user is Joe Bloggs, I would want to make controls A and B visible, but control C invisible.
So if I have a text box which contains the current username, I think I'll need a way to look up the AccessToControl columns.
I can't think of an easy way to do this but I'm sure there must be one. I've tried searching on Google but it's hard when I don't know what to search for! Any ideas to point me in the right direction?
Thanks for your help!
Alan[/FONT]