Access User Name

  • Thread starter Thread starter Karen Landry
  • Start date Start date
K

Karen Landry

Is there a way to retrieve the access user name and insert
it into a table? We would like to allow users to only
maintain a table record that they created but have read
rights to other records.
 
We would like to allow users to only
maintain a table record that they created but have read
rights to other records.

This can be arranged using Access security.

But what on earth are users doing creating tables..?

Tim F
 
Where in the following do you see "create tables"?

I'm asking for my money back on those speed reading classes (or should that
be glasses..?)

Okay, but the answer is still with Access security, create two queries like
SELECT Every, Field, ExceptCreatedBy
FROM ThisTable
WITH OWNERACCESS

and
SELECT Every, Field, ExceptCreatedBy
FROM ThisTable
WHERE CreatedBy = "Eric"
WITH OWNERACCESS

and give users read-only access to the first one and give Eric read-write
access to the second one (but not design permission obviously). You'll also
need a privileged way to create new records:

INSERT INTO ThisTable (NewKey, CreatedBy)
VALUES( Forms!NewRecordForm!txtNewKey,
Forms!newRecordForm!txtCurrentUser
)
WITH OWNERACCESS

You have to create the queries as admin so that the they are owned by admin
and therefore are allowed to run even though the user does not have
permission to carry out the task him or her self.

HTH


Tim F
 
Back
Top