Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User password

Status
Not open for further replies.

Rached

Programmer
Mar 30, 2003
54
DK
hi all..this is my school work, so plz help :) we have this application that connects to ms access db, to manage emplyees. Can u help me on the follwoing issue?

i would like to have 2 users working on the application, "admin" and "assistant"; we want, by default, the admin to have access to all functions in the progarm, while assistant can get access to dew functions only. How can i make a password dialog, on startup, where the user identifies him self; and depending on the user and passowrd, i activate or deactivate some function?

tnx in advance
 
you can use inputbox or inputquery to catch the password or you can build your own by putting the edits, labels and buttons on a separate form and use showmodal.

bool admin;
bool assist;

if (!strcmp(passworddialog->edit2->text.c_str (), adminpassword))
{
admin = true;
assist = false;
}

if (assist)
dofunction ();

in the future be a little more discreet about the school work. we will give you pointers and recommendations but if some here the word school they will clam up. Please read the policies for this forum. I know there are a lot of students on this forum and I dont mind helping. Please try to spend more time to solve your exercises, and use this as a last resort. Read the help files first. ;-)

tomcruz.net
 
tnx man.. well i read every where, we know the methods in consol c++, but not in win32 applications.. more than that it is not an excersize, but rather my question was 1% of a whole project running for 4 months :) tnx again, i will try ure solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top