Multi-User App.

Ali_Ba_Ba
03-09-2003, 12:32 PM
Hey

Just wondering what would be the best way to do this.

What i have is a program, and i am wanting different people to be able to log in. I have it set up so that there is 4 people in a combo box for logging in. But when the enter the main program, i want some people to have certain restrictions, for example not being allowed access to a certain area (Disabling\graying that command button meni item, or whatever)... but how would i go about this? i can think of a way... by adding lots of If or Select case statements? but that would mean like 4 times the coding would it not? is there an easyier way? and if so, how would i go about it?

Thx in advance.

Ali.

Pookie
03-09-2003, 09:49 PM
Depends on how this apps works. So is there only 4 people all up who use it? Or 4 max people logged onto it? Is there only one instance of this app, or lots of it...

If the 4 people are always the same, it would be easy, just set them each an access level, and when a new user logs in, enable and disable all the controls which a person of their access level can access.

chris00
03-09-2003, 10:40 PM
....access level, and when a new user logs in, enable and disable all the controls which a person of their access level can access.

That would be the simplest and most flexible method of doing it, I my self when doing such a thing assign the user a numbers say 1 to 5, and then I do something like:



If UserLevel > 3 then frmName.show Else: frmBlocked.show



The user level would be assigned when the persons logs in and stored in a varibable and then cleared out when they log out.


Just my idea :) :D :cool:

Ali_Ba_Ba
03-10-2003, 08:45 AM
ok, I'll have a fiddle and then post back if i get lost.

Ta'

Ali.

BurnMan2003
03-10-2003, 02:43 PM
I am doing the same type of project, but I am having some trouble understanding how to access the table in the database after I type in the password. How should I do this? The search will be triggered by a submit button, and the text data from the UserID and the Password text boxes should then be compared to the database data in the table. How do I do this?... Thanks in advance! I need help!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum