I have developped a program using vb6 used by a college to store students scores in diferent courses. My problem is that i want to create a button users can use to search for a specific record using the students admission number. I do not have much knowlegde in finding records but i stubled on the following code which when i run, does not generate anything.
Private Sub cmdSearch_Click()
Dim var As String, bmark As String
var = InputBox("Enter your name", "Searching...")
With datAcademic.Recordset
.Bookmark = bmark
.FindFirst ("Adm_no like "" + var + """)
If .NoMatch Then
MsgBox "sorry no student found!"
.MoveNext
.Bookmark = bmark
End If
End With
End Sub
I dont know why the code is not working, could somebody please send some help? I request someone to explain the meaning of .bookmark=bmark and why enclose the ("Adm_No like "" + var + """) in all those quotations, lease your help will be valuable to me.
consider quick response in detail.