oxicottin
Learning by pecking away....
- Local time
- Today, 15:57
- Joined
- Jun 26, 2007
- Messages
- 883
Hello, I’m using a search in my switchboard
and everything works great but, when I type in a number lets say 1.00 then I get no records found (But there are records) then if I type in 1.19 then it brings up a record that have this number. What I’m saying is it wont find numbers that are like 1.00 2.00 3.00 but it will find numbers if the 00 was like 17 or 12 ect. (example 4.17) What am I doing wrong in my code for the search for it to be doing this? PurchaseCost and Price are the ones doing this. Thanks!
and everything works great but, when I type in a number lets say 1.00 then I get no records found (But there are records) then if I type in 1.19 then it brings up a record that have this number. What I’m saying is it wont find numbers that are like 1.00 2.00 3.00 but it will find numbers if the 00 was like 17 or 12 ect. (example 4.17) What am I doing wrong in my code for the search for it to be doing this? PurchaseCost and Price are the ones doing this. Thanks!
Code:
Private Sub cmdSearch_Click()
If IsNull(Me.txtSearch) Then
'show all records
DoCmd.OpenForm "frmRBackyardMain"
Else
On Error Resume Next
'filter for keyword
DoCmd.OpenForm "frmRBackyardMain", , , "[Season] Like '*" & Me.txtSearch & "*' " _
& " OR [Vendor] Like '*" & Me.txtSearch & "*' " _
& " OR [Description] Like '*" & Me.txtSearch & "*' " _
& " OR [Z554] Like '*" & Me.txtSearch & "*' " _
& " OR [OrderNumber] Like '*" & Me.txtSearch & "*' " _
& " OR [PurchaseCost] Like '*" & Me.txtSearch & "*' " _
& " OR [Price] Like '*" & Me.txtSearch & "*' "
End If
End Sub