permissions

krishnanhemanth

Registered User.
Local time
Today, 09:35
Joined
Jun 12, 2009
Messages
115
hi everybody

i have asked a few questions about how to go ahead to secure the data wrt the person that is logging in andiam greatfull that they have been answerd

i have done it in this way

i have created a table .... usernames
field are

name password usertype usercode

george xxxxxxxxx admin 1
david xxxxxxxxx user 2
sunil xxxxxxx viewer 3

i have made a start up login form based on the above table

i also have added a command button called "lock" on all the forms.
by default when a form is open, the form opens in a lock mode....that means the data can only be viewd... the data cannot be modified nor be added.
if the command button "lock'' IS CLICKED, then the form can be edited


where iam stuck is ...i want the this command button "lock"to be visible depending on the user who logs in.

can this be done .... please help


krishnanhemanth
 
We have a button on some forms that allows certain users to open the form
The button is always visible, just won't work if you are not a director.
Here is the After Update Event Procedure - if it makes sence to you.


Private Sub togReeditTrans_AfterUpdate()
' Allow only Directors to click the button.
If (DLookup("[TeamStatus]", "TBLTeamMembers", "[TeamID] = '" & CurrentUser & "'") <> "DIR") Then
'The operator cannot push this button - honest...
Me![togReeditTrans].Value = 0
MsgBox "You are not a Director.", vbInformation, "Director's button ONLY"
End If
End Sub

Looks like the button unlocks the form but the event just prevents some users from clicking the button rather then actually unlocking the form.
 

Users who are viewing this thread

Back
Top Bottom