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!txtUserrig hts.Value = [strITManager]) Then
Cancel = False
Exit Sub
ElseIf Forms!frmLogin!txtUserrigh ts.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
Private Sub Form_Open(Cancel As Integer)
Dim strITAccounts As String
Dim strITManager As String
strITManager = "Managers"
strITAccounts = "Finance"
If (Forms!frmLogin!txtUserrig
Cancel = False
Exit Sub
ElseIf Forms!frmLogin!txtUserrigh
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
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 ?
Will updating the form's Caption property be enough ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.