dear friends,
i'm new to this forum and posted this thread in the MS Access forum which i think is not appropriate. so i decided to post it here which i think is the closest place for this. sorry for whatever clatter this thread may make.
i'm making a select query on 1 table (Items) and 1 field (Description) with a memo type data in it. that means that there are quite a number of words in the said field.
i need to see if the description field contain the words being searched by the user. similar to a web search.
initially here's what i did.
i'm using vb6 and access for my database application.
i used a data control to query a table in database with code below.
Private Sub cmdSpSearch_Click()
Dim findStr As String
Title = "Special Search"
findStr = InputBox("Please enter some description of " _
& " the products.", Title)
Data1.RecordSource = "SELECT * FROM ITEMS WHERE Category = '" & dcboCat1.Text & "' AND SubCatName = '" & dcboSubCat1 & "'" _
& " AND DESCRIPTION LIKE '*" & findStr & "*' "
Data1.Refresh
If Data1.Recordset.NoMatch = True Then
MsgBox "There is/are no product/s available " _
& " with said description. "
End If
end sub
is it possible to make a query out of this query and make another query out of the resulting query and and so on to narrow down search?
if yes, what would be the appropriate sql commands and approach.
thank you so much for any help.
i'm new to this forum and posted this thread in the MS Access forum which i think is not appropriate. so i decided to post it here which i think is the closest place for this. sorry for whatever clatter this thread may make.
i'm making a select query on 1 table (Items) and 1 field (Description) with a memo type data in it. that means that there are quite a number of words in the said field.
i need to see if the description field contain the words being searched by the user. similar to a web search.
initially here's what i did.
i'm using vb6 and access for my database application.
i used a data control to query a table in database with code below.
Private Sub cmdSpSearch_Click()
Dim findStr As String
Title = "Special Search"
findStr = InputBox("Please enter some description of " _
& " the products.", Title)
Data1.RecordSource = "SELECT * FROM ITEMS WHERE Category = '" & dcboCat1.Text & "' AND SubCatName = '" & dcboSubCat1 & "'" _
& " AND DESCRIPTION LIKE '*" & findStr & "*' "
Data1.Refresh
If Data1.Recordset.NoMatch = True Then
MsgBox "There is/are no product/s available " _
& " with said description. "
End If
end sub
is it possible to make a query out of this query and make another query out of the resulting query and and so on to narrow down search?
if yes, what would be the appropriate sql commands and approach.
thank you so much for any help.