Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Feb 2006
    Posts
    34
    Thanks
    0
    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.

    Thanks,
    Chris

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    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:
    <UL>
    <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
    End Sub

    This form only displays records created by the currently logged in user.[/list][/list]HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •