want to retrieve user specific information

M

madiha

i don't really know what group this questions belongs to ... so thought of
posting it in general questions

i created a login page .... but there are different types of users like the
instructors and students ..... i want to define what each of them can view
and i want access to display specific information of the students once they
login... for example users should only be able to view data related to them
and not any other data

how can i do that
 
R

Rick B

First, you don't create a login form. That is all built in. You should set
up User-Level security and place your users into security groups.

You can use the "currently signed on UserID" in your queries and such to
limit a user to only see records they created (for example). You could also
only allow them to view records for students who have the current userid
listed as their teacher. Lots of options.

Without user-level security, what is to stop a person from opening the
tables and viewing or modifying anything they want?


The key though, is to set up userlevel security and then use the
CurentUser() to capture who is signed on.

Good luck,
Rick B
 
R

Rick B

Note. There are functions out there to let you ask if the user is in a
particular group (teacher, student, administrator, etc.) and Access will
look at the security to determine if they are in a particular group. You
can use that to further limit which records can be displayed.

This is NOT a built in function, you would have to built the function into a
module. You can find it by searching previous posts.

http://groups-beta.google.com/groups?q=access+isingroup



Rick B
 
M

madiha

i guess i wasn't so clear .... what i want to do is .... suppose a student
logs in to the database ... i want to display only that students information
... like his/her schedule, his her grades, and so on ... so how can i do that
once they login
 
R

Rick B

In the query you would limit the records returned. If you have a field in
the records that is the same as that student's userid (which he used to log
on), then you would put criteria under that column like...

= CurrentUser()

But, you would also want to make sure the user has no access to the tables
(or they could just go to tthe table).

Rick B
 
Top