Recent

Microsoft Visual Basic 6.0 code

LOG IN FORM (simple)






Private Sub cmdOK_Click()
adoUsers.RecordSource = "select * from tblUsers where username='" & txtUserName & "'"
adoUsers.Refresh

If adoUsers.Recordset.RecordCount > 0 Then
  If adoUsers.Recordset.Fields("password") = txtPassword Then
  frmMain.Show
  Unload Me
   Else
     MsgBox ("Wrong Password!")
        txtPassword = ""
        txtPassword.SetFocus
  End If
  Else
     MsgBox ("Wrong Username!")
        txtUserName = ""
        txtUserName.SetFocus
End If
End Sub

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Sponsor