FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


VB 2005





gcity
How do you create multiple passwords that also go to the same form?
AftershockVibe
I must point out that I've never used VB 2005 and I'm not sure exactly what you're problem is, but I can tell you how I'd do it in the older versions of VB I've played with (6, I think).

When you click submit on the form where you enter the password, call a function (that you will create) which returns true or false. If True, open the form you want and if false generate an error message.

The function will take the password you enter as a parameter (or preferably a hash of it) and then search to see if it matches with passwords on some list you have. Hard-coded for a simple system? Database?

If you want to get clever and use the database you get a lot more flexibility as you can store things like form names for different passwords so a certain group of passwords can open on form, and another group open an entirely different one. This is probably getting ahead of things though.
gcity
I've used Visual Basic 6 aswell but the code that I've used for ceating multiple passwords is different because i want not to use data bases becuase i don't yet know how to use them, but in Visual Basic 2005 i use
IF username.text = " " And password.text = " " then
form2.show
form1.close
else
messagebox.show = retry
end IF

You see that works fine but i want to have more pass words
IF username.text = " " And password.text = " " or
username.text = " 1 " And password.text = " 1 " or
username.text = " 2" And password.text = " 2 " then ...
but it doesnt let me do that because it doesnt understand OR, but where as vb6 does and im not sure how to make sure it looks at all of them but only have to make one if statement
Related topics
Miss Canada crowned Miss Universe 2005
NBA Live 2005
Football Manager 2005
Fifa 2005
China and Russia "peace mission -2005" union milit
Webpage Design Programs
Microsoft ... express 2005
MS Visual Basic Studio 2005 Express Edition
Visual Basic Express Addition
IN NEED:VB 2005 Express Sample Projects
Visual Basic 6
Visual Basic 2005
PROBLEM: Using .lines in VB 2005
How much space req for VS2005 sp1
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.