Switchboard for difference access levels

johannaellamay

Registered User.
Local time
Tomorrow, 07:17
Joined
Jul 19, 2014
Messages
190
I have a database for our HR team. I also have different access levels:

1. Developer
2. Head
3. Officer
4. Assistant

I've already created a form with navigation buttons. But I want to restrict or add a few tabs/subforms per access level. And if I log-in as the developer, I want to be able to see all the ribbons and navigation pane. For Head, there's more access, lesser for Officer, and least for Assistant. How do I do that? Is it possible with macros?

Please help. I'm stuck. :(
 
Are your users logged in as domain users?
 
Are your users logged in as domain users?

Hmm. Not sure what you meant by domain. But I have a separate table that contains User Name, Password, and Access Level fields. I also have a log-in form that only asks a user for his/her username and password.
 
Ah okay - initially when you open the database make the navigation bar and database window hidden.

Add some code that only shows those items if you log in. It's not fool proof if someone know their way around access but is a start.

Other controls such as tabs or command buttons can be enabled or hidden based on the current users access level. I'm not able to help with the code for this at the moment - but a search on here will get you what you need.
 
I hardly ever use Macro's and believe it is not the way to go.
Not enough info to assist really. Table names, field names with data type would be helpful.

As has been suggested, this issue has been addressed many times on this forum.
If you care to provide more info, maybe we could guide you.
 
personally, i would use the inbuilt switchboard manager form, and simply change the switchboard items table for each user, to provide the options you want to give them.

I think the inbuilt switchboard form is really good.

if you have a menubar/ribbon, you could open the forms via code, that checks to see whether a user is allowed to access the relevant form/
 
I hardly ever use Macro's and believe it is not the way to go.
Not enough info to assist really. Table names, field names with data type would be helpful.

As has been suggested, this issue has been addressed many times on this forum.
If you care to provide more info, maybe we could guide you.

I really could not find any answers in this forum. If there was, they were either really hard to understand or just not what I was looking for.

I can't really provide any more info, because the first post basically summarizes, and simplifies my situation.
 
personally, i would use the inbuilt switchboard manager form, and simply change the switchboard items table for each user, to provide the options you want to give them.

I think the inbuilt switchboard form is really good.

if you have a menubar/ribbon, you could open the forms via code, that checks to see whether a user is allowed to access the relevant form/

Thanks. I will try to use the switchboard manager. I've never really heard of it until now.

Do you have or know of any samples out there that has different user levels? Could you share a link so I could study it?
 
Okay, so I tried using the switchboard manager but realized it's not what I want.

It's like this, I have different kinds of forms and user interfaces per Access Level. For example, if I login as a developer, I should be able to see Form1. If I login as Officer, I could see Form2, etc. How do I write that in code ON my login form? I only have two unbound fields: User Name, and Password. What code should I use to call out to the user level that matches the user name? If that makes sense.
 
You may think you have provided enough info but you have not!
Here is some code that may assist you. We DON'T know your setup!!!
' DETERMINE USER SECURITY LEVEL
' (strSecLvl is a global variable set in the modGlbVars module)
If DLookup("[dev]", "tblUserSecurity", "[EmpName]='" & Me.txtUserID.Value & "'") = -1 Then
strSecLvl = "Developer"
End If

modGlbVar

Option Compare Database
Option Explicit

Public strSecLvl As String ' User's Security Level


tblListOfForms
tblUserSecurity


On Form:
Private Sub Form_Open(Cancel As Integer) 'User Security levels.
Select Case (strSecLvl)
Case "Developer"
'Set appropriate form properties for Developer
Me.AllowAdditions = True
Me.AllowEdits = True
Me.AllowDeletions = True
Case Else
MsgBox "The user name with which you have logged in " & _
"is not cleared for access to this screen." & vbCrLf & vbCrLf & _
"Please check your security settings.", vbCritical, "Security Error !"
DoCmd.Close acForm, "frmMainMenu" 'Change Name to your Form Name.
End Select

Good Luck! I was able to easily search this forum for info on this subject. There are also sample db's in the forum.

Good Luck!
 

Users who are viewing this thread

Back
Top Bottom