Access - permission to change by record

L

Linda

I have developed a database to keep track of projects, in the record there is
a field with the contact person's name, can I make it so only that person can
modify that record?
 
T

Tom van Stiphout

On Thu, 27 Aug 2009 07:51:01 -0700, Linda

Yes. The exact solution depends on if you already know who is logged
in. Say that you know that, and that this value is in a global
variable g_strLoggedInUser.
Then you can use this one-liner in the Form_Current event:
Me.AllowEdits = (Me!myContactPersonNameField = g_strLoggedInUser)
(of course you change myObjectNames to yours)
What this does is set AllowEdits to True or False, based on if the
value in your record is the logged-in user.

-Tom.
Microsoft Access MVP
 

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