Login Form based on multi security levels to show certain records…

Sombrero

New member
Local time
Tomorrow, 02:42
Joined
May 26, 2014
Messages
8
Hello everyone…

I found this project “Employee Attendance” in this forum (attached), I think mainly developed by “oxicottin” and others which is well designed and constructed…

I hope someone take it further to the next level by adding login criteria based on security level sorted by employee department so it can do the following:

  • When user Login as “admin”: he will have full access to view, modify (add-edit-delete) all employee records in the attendance calendar form …
  • When user Login as “Guest”: he will have full access to view only (No Modifications) all employee records in the attendance calendar form …
  • When user Login as “Quality Control”: he will have access to view and modify (edit only) all employee records on Quality Control department (he can’t see other department employee records) in the attendance calendar form, and the case for other departments is same …
  • When user Login as “User”: he will have access to view his own records only (he can’t see other department employee records) in the attendance calendar form …
The login form is included in the project but only direct a user to certain form and I hope to be amended to have a multi criteria logins...

I hope its clear :rolleyes: and any help is appreciated…

Many Thanks & Best Regards…:)
 

Attachments

Try this. Modify to suit your needs. You would also need a Module to refer to.
Add this code to a new module named modGlbVars

Option Compare Database
Option Explicit

Public strSecLvl As String ' User's Security Level


Private Sub Form_Open(Cancel As Integer) 'Security
Select Case (strSecLvl)
Case "Developer"
'Set appropriate form properties for Developer
Me.AllowAdditions = True
Me.AllowEdits = True
Me.AllowDeletions = True

Case "Administrator"
'Set appropriate form properties for Administrator
Me.AllowAdditions = True
Me.AllowEdits = True
Me.AllowDeletions = True

Case "Supervisor"
'Set appropriate form properties for Supervisor
Me.AllowDeletions = False
Me.AllowEdits = True

Case "Data Only"
'Set form properties for Data Entry
Me.AllowAdditions = True
Me.AllowEdits = True
Me.AllowDeletions = False

Case "Read Only"
'Set appropriate form properties for Read Only
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False

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 !"
End Select


HTH ... I did not download your db!
 
Thanks burrina for reply...

I don't have very much experience for handling vba codes :o, but its look like about restricting add's and edit's for user cases...

My main concern is to show records base on login criteria especially for department case....

Anyways I will tray to use the codes and see how it fits for my project...

If possible, I hope you check the attachment to have better idea...

Many thanks for helping...:)
 
It has been downloaded 17 times with no response with no feedback??? Good Luck With Your Project!
 

Users who are viewing this thread

Back
Top Bottom