Link to home
Start Free TrialLog in
Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScFlag for Zambia

asked on

Logged in Details ( Ms Access application

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
Exit Sub
ElseIf Forms!frmLogin!txtUserrights.Value <> [strITAccounts] Then
MsgBox "You are not authorized to open this form!", vbOKOnly + vbExclamation, "Rights Not Granted"
Cancel = True
Exit Sub
End If
End Sub

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??????????

Regards
Avatar of ste5an
ste5an
Flag of Germany image

Is it a plain Access application or do you use SQL Server as back-end?
Hi,

Will updating the form's Caption property be enough ?
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial