Thread: security permission
01-16-04, 20:01 #1Registered User
- Join Date
- Jan 2004
- Philadelphia, PA
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!
01-17-04, 04:43 #2Registered User
- Join Date
- Sep 2002
- South Wales
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
'the same person - let them delete
Me.Form.AllowDeletions = False
'Not the same person, do not let them delete
Me.Form.AllowDeletions = true
Please let me know if this is of helpWindows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull