Access User Name

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.
 
T

Tim Ferguson

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
 
T

Tim Ferguson

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
 

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