Question : Access - Form Field Security

Hi,

I have a form, that has three fields for users to enter information, eg Tom, Linda, and Luke. They each have three separate fields to enter note information - such as Luke's Notes, etc, and all three of these fields appear on the one form.

We want to ensure that Tom does not enter information into Linda's field, etc. Please suggest a way to maintain this security level. Is there a way for a user to have to enter a password before typing into his/her specific field?

Thanks.

Answer : Access - Form Field Security

How do you determine who is actually entering the data? Do you have some form of login system?

You can "password protect" the field using the Enter or GotFocus event of that field:

Dim sInput as String

sInput = InputBox("Enter your password:")

If sInput <>  "TomsPassword" Then
  Msgbox "You cannot enter data here"
  Me.SomeOtherControl.SetFocus
End If

You'd have to do this for each notes box.

I also have to question the logic of having a field tied to a person. This is certainly not a normalized structure (what happens when Tom leaves, or when you need to add another user). I would certainly review the database structure to insure you've normalized it before continuing forward.
Random Solutions  
 
programming4us programming4us