S
Song
1st Case Serial Number search works fine.
2nd Case Item Description Like search does not work. No compiling
error and no runtime error but search does not have result which I
know item is in the table.
Private Sub cboSearch_AfterUpdate()
On Error Resume Next
Dim strCriteria As String
If Len(Me.txtSearch) > 0 Then
Select Case cboSearch
Case "Serial Number"
strCriteria = "PODetail.SerialNumber = '" & txtSearch
& "'"
Case "Item Description"
strCriteria = "PODetail.ItemDescription = Like" & "*"
& txtSearch & "*"
End Select
Me.RecordsetClone.FindFirst (strCriteria)
If Me.RecordsetClone.NoMatch Then
MsgBox "No entry found", vbExclamation, "PO Track Search"
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End If
Me.txtSearch.SetFocus
End Sub
2nd Case Item Description Like search does not work. No compiling
error and no runtime error but search does not have result which I
know item is in the table.
Private Sub cboSearch_AfterUpdate()
On Error Resume Next
Dim strCriteria As String
If Len(Me.txtSearch) > 0 Then
Select Case cboSearch
Case "Serial Number"
strCriteria = "PODetail.SerialNumber = '" & txtSearch
& "'"
Case "Item Description"
strCriteria = "PODetail.ItemDescription = Like" & "*"
& txtSearch & "*"
End Select
Me.RecordsetClone.FindFirst (strCriteria)
If Me.RecordsetClone.NoMatch Then
MsgBox "No entry found", vbExclamation, "PO Track Search"
Else
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End If
Me.txtSearch.SetFocus
End Sub