Security on one field in a form

  • Thread starter Thread starter PA
  • Start date Start date
P

PA

I have a DB with 9 users. 8 of them enter data on a form. I need to have
the ninth be an approver and check a Yes/No field to give approval, but do
not want anyone else to be able to edit this field. Any help in doing this
will be greatly appreciated.

Thank you
Paul
 
I do not believe that this can be done using Workgroups. You will most
likely need to code this, and with that I can offer no aid.
Good luck
 
PA said:
I have a DB with 9 users. 8 of them enter data on a form. I need to have
the ninth be an approver and check a Yes/No field to give approval, but do
not want anyone else to be able to edit this field. Any help in doing
this
will be greatly appreciated.

Paul,

One method I use is the Tag property. In this example I have user level
security set up and have 3 user accounts, "User1", "User2" and "User3". In
the form's module I have this code:

Sub ControlLock()

If CurrentUser = Left(Me.ActiveControl.Tag, 5) Or CurrentUser =
Right(Me.ActiveControl.Tag, 5) _
Or CurrentUser = Mid(Me.ActiveControl.Tag, 6, 5) Then
Me.ActiveControl.Locked = False
Else
Me.ActiveControl.Locked = True
End If


End Sub

In each control's Tag property I have any combination of all 3 user names
depending on which ones are to have access. So if I want all three, then
the Tag property contains "User1User2User3".

The code is called from the controls' Got Focus event and, if the
CurrentUser is in the Tag property then that control is unlocked.

Obviously you're a bit limited as to what user names you can use and you
have to set up user level security (which is a whole other complex topic)
but the method works well for me.

HTH - Keith.
www.keithwilby.com
 
Back
Top