Thursday, August 21, 2008

User System Login

Hi.

Sample code in System Login. And theres a 3 attempt to log.

Set rs = BASACONN(connstr, "select * from usersettings where username=txtuser and password=txtpassword")

If rs.EOF Then
MsgBox "Invalid Username/Password. Please Try again", vbExclamation, "Invalid"txtusername.SetFocus
txtcount.Text = Val(txtcount.Text) + 1

'''wrong password
If Val(txtcount.Text) > 2 Then
MsgBox "You have 3 Invalid Input of Username/Password. This Program will terminate",vbCritical, "Exit Program"
End
End If
''end

Else

Unload Me
Main.Show

Endif

No comments: