Using VB6, how do I create a simple logon system using a combo box for user names and a text box to input the password?
For the password system alone I made this code:
Private Sub Text1_Change()
If Text1.Text = "password" Then
Form1.Visible = False
Form2.Visible = True
MsgBox ("Incorrect password")
Trouble is I have no idea how to use a combo box apart from adding items. But I dont know how to link the items in the combo box to other objects etc.
For example, what code would I need for user name 'Andy' in the combo box (combo1) whose password is 'playstation' to be input in the pasword box (text1) and logging in by pressing the Log in button (command1). So when the correct password is entered, form1 disappears and form2 appears.
Please dont just send me a link to another site unless it is useful. I want some code to write!
Thanks anyway for reading this all the way to the end without getting bored and leaving.