Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Philadelphia, PA

    Question Unanswered: security permission

    My database has been secured by way of the User Level Security Wizard. BUT, I want each user to only have the permission to delete their own records. User Level Security will allow me to NOT give users delete permissions but this method is too extreme. I want the individual user to be able to delete their OWN entries, not someone else's.

    I'm using the CurrentUser function, limiting the user's view to their own records, but I have one "smartie_pants" user who find pleasure in policing the others. I want to write code that will prevent her from manipulating everyone's records.

    By the way, this is a time tracking system.

    Thanks, in advance, for the help!

  2. #2
    Join Date
    Sep 2002
    South Wales

    Lightbulb CurrentUser

    In the context of a form:

    You could check the CurrentUser perhaps on the "current" event of a form (lets assume the user who created the record is stored in a field called strOwner which is on the form - strOwner could be either visible or hidden) then perhaps using a case statement something like...

    Select Case CurrentUser() = me.strOwner

    Case True
    'the same person - let them delete
    Me.Form.AllowDeletions = False

    Case else
    'Not the same person, do not let them delete
    Me.Form.AllowDeletions = true


    Please let me know if this is of help
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

Posting Permissions

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