Results 1 to 2 of 2
Thread: Reading security (2002)
2006-03-20, 12:38 #1
- Join Date
- Feb 2006
- Thanked 0 Times in 0 Posts
Reading security (2002)
I am using Access 2002 with its user and group security. I have a group that can only read, and a group that can add, change other people's enteries, and delete enteries. Now I need to be able to allow someone to add records, but only change the records that they have entered, and no one else's. How would I do this? Any help would be appreciated.
2006-03-20, 13:30 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Reading security (2002)
Access does not have native features for this, but you can do the following:
<UL><LI>Add a field Username to the table (text, size 50 or so).
<LI>Provide two forms:
<LI>One based on the entire table, with the Recordset Type property set to Snapshot, making the records read-only.
<LI>Another one based on a query that selects records for which Username equals [CurrentUser].
Add code to the BeforeInsert event of this form:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.Username = CurrentUser
This form only displays records created by the currently logged in user.[/list][/list]HTH