Re: Individual Record Permissions
- From: Scott McDaniel <scott@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 20 Jul 2006 21:17:47 -0400
On Thu, 20 Jul 2006 10:58:02 -0700, schuh.mike <schuhmike@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I am creating a database for students' profiles. I have one table, with each
record being a different student and information. I would like to set up
security so that the student can only modify their record, and only view
everyone elses.
Any ideas how this can be achieved? My current theory is to check the
username they are logged in as, and then lock/unlock the textboxes whether
its their profile or not. Sound right?
Correctly implement User Level Security, then set the .Enabled property of the form based on the login. Do this in the
form's Current event ... I'm assuming that you'd store the student's username somewhere (you have to be able to
determine that Sue Smith's user name in the .mdw file is ssmith123, or whatever it may be), so you do this:
Sub Form_Current
Me.Enabled = (Me!strUserName=CurrentUser)
End Sub
Assuming you have a field on the form named strUserName which stores the student's UserName, this would effectively
allow students to browse all records, but only their own data would be Enabled for edit/update.
Some ULS links:
www.jmwild.com
http://www.ltcomputerdesigns.com/Security.htm
http://www.geocities.com/jacksonmacd/
Scott McDaniel
scott@xxxxxxxxxxxxxxxxxxxxxxxxx
www.infotrakker.com
.
- Prev by Date: Re: Digital Certificate for runtime installs. (Not Self Cert)
- Next by Date: Re: Object Permission Message
- Previous by thread: Re: If faq_IsUserInGroup Syntax for three groups.
- Next by thread: Re: Forgotten Password
- Index(es):
Relevant Pages
|