PDA

View Full Version : group and users



pramoc
07-12-2007, 07:58 AM
I have access application shared drive.
? I have access application on shared drive.
? It is accessed by three 3 group of people( doer, reviewers,team leaders(tl))
? There are15 doers,3 reviewers,3team leaders)

? I have a main menu screen which I have given in word attachment .
? My requirement is that (if doer logs in then doer button should be enabled and teamleader and reviewer button should be disabled)



? If reviewer logs in then doer button should be enabled and agent and team leader?s button should be disabled and same goes for team leader.
? 2 nd requirement is to add new doers ,reviewer,teamleader to their group respectively.

plz help

qff
07-12-2007, 09:02 AM
I would create a table of Users and Usergroups where username is the user's Windows login name
UserGroups
UserName UserGroup
Employee1 Doer
Employee2 Reviewer
Employee3 TeamLeader

In the form open event I would use the following code to determine which buttons to display/hide

Private Sub Form_Open(Cancel As Integer)
Dim myUsername As String
Dim myUsergroup As String

myUsername = Environ$("username")
myUsergroup = DLookup("usergroup", "UserGroups", "[username]='" & myUsername & "'")

Select Case myUsergroup
Case "Doer"
Command0.Visible = True
Command1.Visible = False
Command2.Visible = False

Case "Reviewer"
Command0.Visible = True
Command1.Visible = True
Command2.Visible = False

Case "TeamLeader"
Command0.Visible = True
Command1.Visible = True
Command2.Visible = True

End Select


End Sub

hope this helps

qff

pramoc
07-12-2007, 09:09 PM
if i create a table with username and groupname .

.But how to prevent everyone from accessing that tabel .

pramoc
09-17-2007, 07:33 AM
I have access application shared drive.
? I have access application on shared drive.
? It is accessed by three 3 group of people( doer, reviewers,team leaders(tl))
? There are15 doers,3 reviewers,3team leaders)

? I have a main menu screen which I have given in word attachment .


1st requirement is to add new doers ,reviewer,teamleader to their group respectively.

what options are available to us.
PLZ provide code
thanks