Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making a query from an existing query

Status
Not open for further replies.

raport

Programmer
Nov 7, 2006
5
PH
dear friends,

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.
 
sorry i should have posted this in the sql access jet engine forum.

thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top