Hi all,
I have created a custom search form where the user is asked to input the staff number and then select search. My problem is, how do I make the staff details form go to the record specified by the staff number in the search form. I have included the code from my search form. I am using SQL Server.

Private Sub cmdStaffSearch_Click()

Dim strCriteria As String

frmStaffSearch.Show vbModal
'define the search criteria
strCriteria = "[Number] LIKE '" & frmStaffSearch! txtBrigadeNumberSearch.Text & "'"
With rscmdStaffDets
.Find strCriteria
If .EOF Then
MsgBox ("Staff member not found please check the Staff Number entered")
End If
End With
frmStaffdets1.refresh
Unload Me
End Sub

Cheers