search box probs

tkd1987

Registered User.
Local time
Today, 19:49
Joined
Jan 3, 2006
Messages
26
i have a search box which has a list of everyone, showing their 1st name and surname, with a txt box at hte top you can type any part of their name and i will display the results, when you either double click or press the view button it will display there record, but at the mo it is displaying the same record. here is my code

Private Sub cmdView_Click()
On Error GoTo Err_cmdView_Click
Dim rs As Object

If IsNull(Me.List0) Then
MsgBox "No Selection ! ", vbCritical, " MRHS"
Me.List0.SetFocus
Exit Sub
Else
DoCmd.OpenForm "frml_Student_Info"

Set rs = Forms!frml_Students_Info.Recordset.Clone
rs.FindFirst "Student ID = " & Me.List0
Forms!frml_Students_Info.Bookmark = rs.Bookmark
DoCmd.Close acForm, Me.Name
End If

Exit_cmdView_Click:
Exit Sub

Err_cmdView_Click:
Resume Exit_cmdView_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom