Lock Control based on User

  • Thread starter RedHeadedMonster via AccessMonster.com
  • Start date
R

RedHeadedMonster via AccessMonster.com

I have a database that tracks Problem Tickets. I have a form in a database,
on that form is an overall StatuS for the Problem Ticket, i.e., Open, Closed,
etc. I currently have it set so that only the ADMIN or the Super User has
privileges to change that status. However, now they want that if a person is
the Process Owner for a particular Problem, they should be able to change the
status since technically they are responsible for the problem. So depending
on the problem the Process Owner changes. Im currently using the following
code that Locks or Unlocks the control:

If Forms!Login.LoginName = "13" Or Forms!Login.LoginName = "19" Then
Me.OverallStatus.Locked = False

ElseIf Forms!Login.LoginName = Me.ProcessOwnID Then
Me.OverallStatus.Locked = False

Else
Me.OverallStatus.Locked = True
End If

Everything works, except the ELSEIF statement.

Any suggestions?
RHM
 

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