Access - permission to change by record

  • Thread starter Thread starter Linda
  • Start date Start date
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?
 
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
 
Back
Top