I have a listbox displaying results from a string search in a text box of a query. Im trying to build an event where the user
can doubleclick on the selected result and it will take them to that record. This is the code I have but it won't take me to
the selected record in the form. It takes me to a new blank record in that form. The fields in the query are on the attached
Private Sub SearchResults_DblClick(Cancel As Integer)
DoCmd.OpenForm "WorkOrderF", , , WorkOrderID = " & SearchResults"
Private Sub WorkOrderSearch_Change()
Dim vSearchString As String
vSearchString = WorkOrderSearch.Text
SrchText.Value = vSearchString
If Len(Me.SrchText) 0 And InStr(Len(SrchText), SrchText, " ", vbTextCompare) Then
Me.SearchResults = Me.SearchResults.ItemData(1)
If Not IsNull(Len(Me.WorkOrderSearch)) Then
Me.WorkOrderSearch.SelStart = Len(Me.WorkOrderSearch)
All help would be greatly appreciated! Thank you!