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
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