>I am confused. The code has a =SEEK('table','value','index) followed by IF FOUND(). The SEEK finds a key match but the FOUND is not triggered. Is it because of the =SEEK. What does the = do anyway.
>
>Thanks
>
>Brenda
The SEEK command requires that the table you want to do the seek in is the the current workarea and that the proper index tag is set beforehand. The SEEK() function allows you to specify a different table and/or index from the current one to do the seek. Both should set the FOUND() status correctly, but in the case of using the SEEK() function, you may also need to specify the alias parameter to the FOUND() function.
USE table1 ORDER TAG field1
SEEK "Smith"
FOUND() or FOUND("table1") should give proper results.
USE table1 ORDER TAG field1
USE table2 ORDER TAG fieldx IN 0
SELECT table2
=SEEK("table1","Smith","field1")
In this case, FOUND() could produce a bad result because the current area is for table2, and the seek took place in table1. FOUND("table1") should yield correct results, or switching to table1 first would allow the FOUND() to be correct.
The "=" is required becasue of there being both a SEEK command and a SEEK() function to distinguish them from each other