Access Rights

Anelka

New member
Local time
Today, 17:07
Joined
Aug 2, 2002
Messages
9
Is it possible to restrict certian people from adding records using certian forms?

I have a group of 3 different people that need to add records but the rest of the office only need to view the db.

The database was made using access 2000.

Cheers
 
Depends on how you define your users. The CurrentUser() function will return the user name of a database that is using true Access security with a workgroup and user permissions. The below code will give you an idea on how to use it...
Code:
Private Sub Form_Open(Cancel As Integer)

If CurrentUser = "Joe" Then
    Me.AllowAdditions = False
Else
    Me.AllowAdditions = True
End If

End Sub

The Environ function will return the users network name.
Code:
If Environ("UserName") = "Joe" Then
    Me.AllowAdditions = False
Else
    Me.AllowAdditions = True
End If
 
Last edited:

Users who are viewing this thread

Back
Top Bottom