Drew
April 1st, 2001, 10:45 PM
The code for the log in VB form is this.
public LoginSucceeded as Boolean
private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = false
me.Hide
End Sub
private Sub cmdOK_Click()
'check for correct password
If txtPassword = "password" then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = true
me.Hide
else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
private Sub Form_Load()
End Sub
I want to input a databbase with user names and passwords. How would I test to see if the user name and the password are in the database so the person can log in?
public LoginSucceeded as Boolean
private Sub cmdCancel_Click()
'set the global var to false
'to denote a failed login
LoginSucceeded = false
me.Hide
End Sub
private Sub cmdOK_Click()
'check for correct password
If txtPassword = "password" then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = true
me.Hide
else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
private Sub Form_Load()
End Sub
I want to input a databbase with user names and passwords. How would I test to see if the user name and the password are in the database so the person can log in?