I am doing a search button that displays the record based on on my data in a table called Stock_Master.
The Stock_Master Data Type are
Product_Id = Number
Category = Text
Type = Text
Size = Text
Total_Quantity = Number
The following are my VBA code for the button:
Dim strsearch As String
Dim strText As String
strText = Me.StockMasterSize.Value
strsearch = "select * from Stock_Master where ((Size like " & strText & "))"
Me.RecordSource = strsearch (highlithe when debug)
End Sub
However, the error-code appears when I search for the data 1 Lt in the textbox and clicked the button that is:
Syntax Error (missing operator) in query expression '((size like 1 Lt))'
I used similar coding for another search button and it worked but not this.
PLEASE HELP!