Regarding User level Security

  • Thread starter Thread starter jacky
  • Start date Start date
J

jacky

I've read TC's RE posted on Oct 23, 2003, in regards to
user level security which provent a specific user from
viewing others' data.

Even if he explained in detail, I couldn't make it.
Can anybody help me find a solution for that?

For example,
I have a table - 3 columns, 100 rows like the following.

FirstName, LastName, Salary
--------- -------- ------
John Wallace 30000
Sam Nielson 35000
.......
....
.....
.....

When John logs in a database with ID and PID, he only can
view his own salary (30000). This is an example.



Please refer to the following instruction posted by TC.
==========================================================
Yes, you can do this using Run With Owner Permission
(RWOP) queries. For
example, you could set this up so that user 'A' would not
be able, by any
method, under any circumstances, to see the data entered
by user 'B'. This
would require a full implementation of so-called user
level security.

However, that is often overkill. An easier & simpler
method is to do it
through VBA code. Define a field in each table, to hold
the username of the
user who created that record. Code the BeforeUpdate event
of each form, to
put the value of the CurrentUser() function into that
field. Now each record
knows who created that record. Then base each form on a
query like:

SELECT * FROM MyTable WHERE CreatedBy = CurrentUser()

where CreatedBy is the new field. Then, each form would
only show the
records that were created by the current user.

You would need to create some new users in your Workgroup
file, & assign a
password to the Admin user. Then, each user would have to
log-on with their
username, & Currentser() would return that name. You
would not need to do
any of the other 50 gazillion things that are normally
needed for user level
security.

HTH,
TC

========================================================
 
I use forms for all my applications with the back end
restricted. I control access to records by the Access
userID. I have a table with name and userid. That is
linked to the tables and preventing anyone from seeing
records without their name on them.


Jim
 
Back
Top