User Level Password Form (1 Viewer)

melvis

Registered User.
Local time
Today, 04:12
Joined
Aug 2, 2002
Messages
40
Hiya,

I am trying to create a form that can be used as the user level logon screen. The form has been designed with an option group for selecting the type of user and then a text box for the password to be entered in, followed by a continue button.

Once the user has selected their type and entered the password, I want this to then open a switchboard which will have certain features unavailable/available, depending on the user type.

The only thing I can't understand is how to write code that enables the password to be entered - depending on the user type selected in the option group.

If anybody has any ideas, I would be extremely grateful.

Thanks.

:confused:
 

Autoeng

Why me?
Local time
Yesterday, 23:12
Joined
Aug 13, 2002
Messages
1,302
Why not use the security built into Access which will allow you to protect forms and table in the same way?

Autoeng
 

Oldsoftboss

AWF VIP
Local time
Today, 13:12
Joined
Oct 28, 2001
Messages
2,499
I have built similar, Not great security but OK if your users dont know much about access. I have a table that holds username, password, userlevel.

Create a combobox based on this table using the 3 fields

Then a textbox to enter the password.

A button called "LogOn" with the code on click

If me.passwordfield = me.combobox.column(1) then
if combobox.column(2)="Manager" then
Do this and that 'Your code here
elseif combobox.column(2)="User" then
Do something else 'and here
end if
else
Msgbox "LogOn Details Incorrect"
End if


I use a select case statement to return the user type but as you probably realize, experiment and learn.

HTH
Dave
 

ghudson

Registered User.
Local time
Yesterday, 23:12
Joined
Jun 8, 2002
Messages
6,195
Out of curiosity... :confused:

How are you protecting your application so that the users are not able to access the db objects (menu bars, tool bars, tables, modules, design views, etc)?

How are you protecting your application so that a user can not import your password table into another database and view the info outside of your db?

Using true Access security will protect your application if you properly set up your user work groups and assign permissions accordingly.

HTH
 

Oldsoftboss

AWF VIP
Local time
Today, 13:12
Joined
Oct 28, 2001
Messages
2,499
"Security" is probably the wrong term to use for what I'm doing. More like setting the Db so when a certain person logs on it takes them to a particular form etc. so they dont have to click, cliclk, click to get to a screen they use regularly. (Sometimes the only screen they use)
Dave
 

melvis

Registered User.
Local time
Today, 04:12
Joined
Aug 2, 2002
Messages
40
Thanks Autoeng.

Worked a treat.

Oldsoftboss,

Thanks for the code. Haven't tried it yet though, boss got me working on something else...

I like the db form you emailed to me - just what I was looking for. Thanks for you help.

ghudson,

Now you got me!!!

If I used Access security would this mean that the password table cannot be imported and viewed outside of the db? Or would I need to do something else?
 

Autoeng

Why me?
Local time
Yesterday, 23:12
Joined
Aug 13, 2002
Messages
1,302
Access security will do exactly what you want, direct user to particular form, but like ghudson says what you have is very rudimentary and someone will screw you in the end. "I was just looking around" is sure to be in your future along with rebuilding all of your hard work. Take our advice and use the built in security. Make a back up first!

Autoeng
 

melvis

Registered User.
Local time
Today, 04:12
Joined
Aug 2, 2002
Messages
40
Thanks for the advice.

I have just completed the user level security wizard and was well impressed.

Just tried it out on an unsespecting admin clerk - worked a treat.

Thanks for all your help.

:D
 

Users who are viewing this thread

Top Bottom