Individual Record Permissions

S

schuh.mike

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?
 
S

Scott McDaniel

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@takemeout_infotrakker.com
www.infotrakker.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top