I have an error when I try to run the program after inserting some code.

Name:  Screenshot (13h 31m 45s).jpg
Views: 616
Size:  141.1 KB

VB6 Code
Code:
Option Explicit

Dim db As DAO.Database
Dim rsLogin As DAO.Recordset

Private Sub Form_Activate()
username.SetFocus
End Sub

Private Sub lblcancel_Click()
End
End Sub

Private Sub lblcancel_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblcancel.BackColor = vbRed
End Sub

Private Sub lbllogin_Click()

If username.Text <> "" Then
Set rsLogin = db.OpenRecordset("SELECT*FROM password")
rsLogin.findfirst "username='" & username.Text & "" '
If Not rsLogin.NoMatch Then
If password.Text <> "" Then
If rsLogin.feilds!password = password.Text Then
frmmenu.Show
Unload Me
Else
picerror.Visible = True
username = ""
password = ""

End If
End Sub

Private Sub lbllogin_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lbllogin.BackColor = vbRed
End Sub

Private Sub lblok_Click()
picerror.Visible = False
End Sub

Private Sub password_GotFocus()
password.BackColor = &H808080
End Sub

Private Sub password_LostFocus()
password.BackColor = &H404040
End Sub

Private Sub picbottom_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lbllogin.BackColor = &H808080
lblcancel.BackColor = &H808080
End Sub

Private Sub username_GotFocus()
username.BackColor = &H808080
End Sub

Private Sub username_LostFocus()
username.BackColor = &H404040
End Sub