I want all the forms to show the names or title of a person logged in the application , the same way my application is able to authorize the the forms to use as per user rights, below is my code for segregation of duties:
Private Sub Form_Open(Cancel As Integer)
Dim strITAccounts As String
Dim strITManager As String
strITManager = "Managers"
strITAccounts = "Finance"
If (Forms!frmLogin!txtUserrights.Value = [strITManager]) Then
Cancel = False
ElseIf Forms!frmLogin!txtUserrights.Value <> [strITAccounts] Then
MsgBox "You are not authorized to open this form!", vbOKOnly + vbExclamation, "Rights Not Granted"
Cancel = True
The above profile is for an accountant now all what I want to see in all forms is a title called accountant as per profile above.Any idea??????????