Login Form - VB.NET
Hi i'm doing a project and i need help.
I'm designing a system, whereby am unable to use 2 different login authorities, which are Admin and Non-Admin. I am using VB.NET and Ms. Access and need help for the codes.
I want something like, if i click on admin/non admin (with different passwords) a dialog box pops onto the screen and asks for the password. If the password is correct it should take me to the form i want. Something of this sort please.
Help me with the codes n explanation thanks, ASAP
Jollyyy100
Junior Poster in Training
84 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
Ok, thnks...Well am basically just asking whether is it possible to code both admin and non-admin with different passwords and is it possible
Jollyyy100
Junior Poster in Training
84 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
Hey i got the solution to this, but i used kind of a tricky style, thnks for your help :P, But if anyone gets better solutions to this lemme know
Jollyyy100
Junior Poster in Training
84 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
How did you do it Jolly, Im now who you were before you got the codes..
Bring me out ..I cant even deduce how to link the admin form with database forms..
fourty
Hi i basically used the vb 6 format... that is add a textbox on ur form and then add a button, double click the button and write the codes as follows:
dim password as string
password=textbox1.text
if textbox1= "jolly" then
form2.show
else
Messagebox.show ("Invalid password")
end if
In this case the password is jolly. U can drag a label and write username into it then place the textbox besides it. Hope this helps you if u encounter any error let me know, so i could help you. You can use this process without connecting to a database or with (/both)
Jollyyy100
Junior Poster in Training
84 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
CORRECTION USE THE FOLLOWING NOT THE ABOVE:
Pass1 = txt1.Text
If Pass1 = "jolly" Then
MessageBox.Show("WELCOME")
Form1.Show()
Me.Hide()
Else
txt1.Clear()
MessageBox.Show("INVALID PASSWORD, TRY AGAIN")
txt1.Focus()
End If
Jollyyy100
Junior Poster in Training
84 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
Pass1 = txt1.Text
If Pass1 = "jolly" Then
MessageBox.Show("WELCOME")
Form1.Show()
Me.Hide()
Else
txt1.Clear()
MessageBox.Show("INVALID PASSWORD, TRY AGAIN")
txt1.Focus()
End If
Jollyyy100
Junior Poster in Training
84 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0