-
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
-
You could pick up the bookmark from the record found and then use the Move command with ADO.
Hope that helps,
P.
-
Hi Paul, I am a little unsure what you mean do you have a simple example.
Cheers
-
Thanks Paul,
will give it a try.