only allow edit of the data that user entered

  • Thread starter Thread starter Jesper F
  • Start date Start date
J

Jesper F

I have a multiuser db. I'd like to restrict users to only be allowed to edit
recods that they themselves created.
They should be allowed to read everything. This would require tracking
records with user specific value in a field.
Could I for example use the users PID for this and put this in the
CreatedBy-field? Inserting the username would do I guess if that didn't
change ever. Can I get the PID throug code or some other permanent
identification of that user?
Thanks for any input on how to do this.
 
You will need to have the username on the record somewhere.
If the username is the same as the login name?

In the On Current event type
If currentuser() = me.username then
me.allowedits = true
else
me.allowedits = false
end if

If the login name is different than the username you can
add the login name to a table with the username. Then use
a dlookup on the form to get the username. You do not have
to make it visible

Chris
 
You will need to have the username on the record somewhere.
If the username is the same as the login name?

Okay I thought I might have to. Thanks for your help I think I can make it
work.
 
Back
Top