Password protect a form record?

F

FL

Is it possible to password protect a form record once data entry has been
made to prevent other users to modify information. I have a few users
entering data into the same form. However, each user has ownership of his
records and would rather others to view only or request permission to change
the record from the owner of originator of record. Each user requires the
ability to find and update any of their own records only. Each user
requires the ability to view records created by others but not change them
without permission.
 
K

Keith Wilby

FL said:
Is it possible to password protect a form record once data entry has been
made to prevent other users to modify information. I have a few users
entering data into the same form. However, each user has ownership of
his
records and would rather others to view only or request permission to
change
the record from the owner of originator of record. Each user requires
the
ability to find and update any of their own records only. Each user
requires the ability to view records created by others but not change them
without permission.

You'll need to write some code to record the identity of the originator and
then test for that identity in the form's current event.

To record the user's identity, something like this in the form's before
update event:

Me.txtMyTextControl = CurrentUser

To test the record for the user's identity, something like this in the
form's current event:

If Me.txtMyTextControl = CurrentUser Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If

This assumes that the CurrentUser property returns useful names but you
might want to consider using the network user ID instead. You'll probably
want to take care of the AllowDeletions property too.

Keith.
www.keithwilby.com
 

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