>the relation...
>
>Say a user look for a book based on the title of book, he will input a word as a keyword and system will look for it in cTitle field of Tbooks table, and display it in GridBook. I just use SET FILTER and it works just fine.
>
>But,when system can't find it, the keyword will be transformed as a code,using metaphone algorithm, and system will look for the same code in cCode field of Tcode table. Then all of the words, that has the same code, will be displayed in GridWord. (There are 2 fields in Tcode table, cWord and cCode). I just use SET FILTER and it works just fine too.
>
>The problem is I want to filter Tbook table based on the words that is displayed on the GridWord.
>
>How is it?
I think I still couldn't understand it right. Will try with the part I could understand :
thisform.grdBook.Recordsource = ''
select * from TBook ;
where upper(cTitle) like '%'+upper(lcKeyWord)+'%' ;
into cursor crsBooks
if _Tally = 0
select * from TBook ;
inner join Tcode ;
on upper(Tbook.Title) like '%'+upper(trim(Tcode.Code))+'%' ;
into cursor crsBooks
endif
thisform.grdBook.Recordsource = 'crsBooks'
Cetin