I've been designing a Bookstore where students can login to their accounts and buy books.
And since then i've been struggling with this " error '424' Object required " and i i don't know how to fix it.
This starts at the beginning of the program at the login.
Here is my code:
Private Sub Command1_Click() Dim str As String studentid = Text1.Text Password = Text2.Text cond = False str = "SELECT StudentID,Password From student ORDER BY StudentID ASC" dataStudent.RecordSource = str "<=== I keep having error here dataStudent.Refresh datStudent.Recordset.MoveFirst studentid = Text1.Text Password = Text2.Text cond = False Do While Not dataStudent.Recordset.EOF And cond = False If dataStudent.Recordset.Fields("StudentID").Value = studentid Then If dataStudent.Recordset.Fields("Password").Value = Password Then Form2.Show Form1.Hide cond = True End If End If dataStudent.Recordset.MoveNext Loop If cond = False Then MsgBox = " Incorrect Login or Password" End If End Sub
I keep getting error at line 10 altought the statement looks correct.
I'm desperate and don't know what to do.
Would welcome anything
Edited 6 Years Ago by Melechesh: n/a