You can either use a select statement, which I prefer, or SET FILTER TO field1=trim(cfield1) and field2=trim(cfield2)... If you choose the SQL select option, you have to SET ANSI OFF first. To avoid having to rebuild the grid, I always bind the grid to a cursor, which I initialize in the activate of my form, by the command
Select * From myTable Into Cursor myCursor Readwrite Where .F.
lcAnsi=Set('Ansi')
Set Ansi off
Select * From myTable Where field1=trim(cfield1) and field2=trim(cfield2) ... Into Cursor curDummy
Set Ansi &lcAnsi
Select myCursor
Zap
Append From Dbf('curDummy')
YourGrid.Refresh()
>Thanks Tore
>
>What if I have 2 records as a result of the search. I want to display them to the user and allow the user to select one of them which will then jump to that record and then display this information in my main form. Do I need to use a select statement?