Vitalis
Apr 14, 2006, 01:00 AM
I am writing a program using Visual Basic 6.0. In my project, I would like to have the users identify themselves as the authorized users i.e. there is an administrators account and the guest account like it is in windows XP. Using the Visual basic progam, can someone give me tips and even codes on how to code program. I would like to have the administrator to have full permission of the program while the guest to have limited privileges.
ScottGem
Apr 14, 2006, 05:50 AM
I can't give you specifics (not a VB coder). But I can tell you the basic process.
First you need to have a table that stores the account information (i.e. username, password account type). Next, you have to create a public, global variable to store the username or account type of the currently logged in user. Finally, you have to check that info before performing any action that would be restricted to only certain account types. Something like this:
If accountype = "Admin" Then
do this
Else
do that
End if