lacampeona
Registered User.
- Local time
- Today, 01:38
- Joined
- Dec 28, 2015
- Messages
- 392
Hello
I have login form PasswordLogin RC4 5.3 version from user IslaDogs , the login form has 3 access levels.
1. Default User
2. Administrator
3. Developer
when user login i want to hide ribbon and want to open specific form to him, and dirrent form for admin and different form for developer. I put the code in the end of the cmdLogin procedure, i also have to put Dim AccessLevel as Integer no? i try it and now i have always ribbon hidden...the code is not listening me...i enter with admin and i dont have ribbon the same for default user...
how i have to write to make the code work? Is something like that? many thanks in the advance
If AccessLevel = 2 Then
DoCmd.ShowToolbar "Ribbon", acToolbarYes
DoCmd.OpenForm "GlavniMeni"
Else
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.OpenForm "GlavniMeni"
End If
Exit_Handler:
Exit Sub
Err_Handler:
MsgBox "Error " & Err.Number & " in cmdLogin_Click procedure: " & Err.Description
Resume Exit_Handler
End Sub
I have login form PasswordLogin RC4 5.3 version from user IslaDogs , the login form has 3 access levels.
1. Default User
2. Administrator
3. Developer
when user login i want to hide ribbon and want to open specific form to him, and dirrent form for admin and different form for developer. I put the code in the end of the cmdLogin procedure, i also have to put Dim AccessLevel as Integer no? i try it and now i have always ribbon hidden...the code is not listening me...i enter with admin and i dont have ribbon the same for default user...
how i have to write to make the code work? Is something like that? many thanks in the advance
If AccessLevel = 2 Then
DoCmd.ShowToolbar "Ribbon", acToolbarYes
DoCmd.OpenForm "GlavniMeni"
Else
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.OpenForm "GlavniMeni"
End If
Exit_Handler:
Exit Sub
Err_Handler:
MsgBox "Error " & Err.Number & " in cmdLogin_Click procedure: " & Err.Description
Resume Exit_Handler
End Sub