Low Level Form Security

khunter

Registered User.
Local time
Today, 13:45
Joined
Nov 23, 2003
Messages
25
I have a db with low level security (A table contains a username, password and access level).

The database startsup with the login form and asks the user for the input. I would like to know if it is possible (if so where to start) to hide and/or restrict users based on the value of the access level in the table.

Thanks in advance.
 
Hide or restrict them from what exactly? From the entire DB? Could you explain a little more.

Thanks
 
I would like to hide buttons and forms based on what access level that user has. i.e. If a user has "Admin" it would allow the form to be run, but if they had "Basic User" it would reject the request.

tblUsers:
strUserName
strPassword
strAccessLevel

If User A logins and has "Admin" in strAccessLevel I want the form to show button1, if it doesn't contain "Admin" do not show it..etc...

Hope that is a little more detailed.

brian0721 said:
Hide or restrict them from what exactly? From the entire DB? Could you explain a little more.

Thanks
 
You can use the built-in security model to secure objects. If you want to have different settings based on data or within objects, you'll need to code it all yourself. For example, to show or hide buttons on a form depending on security level, you would add code to the form's Open event:

Code:
If UserLevel = "admin" Then
    Me.SomeControl.Visible = True
    Me.SomeControl2.Visible = True
Else
    Me.SomeControl.Visible = False
    Me.SomeControl2.Visible = False
End If
 

Users who are viewing this thread

Back
Top Bottom