>
>MyString=create_string('m.field1','m.field2',etc...)
>
>IF .NOT. EMPTY(MyString)
> SELECT * FROM my_table ;
> WHERE &MyString ;
> INTO CURSOR MyCursor
>ELSE
> =msgbox('Invalid Criteria',"",16)
> RETURN
>ENDIF
> Example, if m.field1='Orange' and m.field is empty and
>m.field3=4, create_string will return me this:
>
>ALLTRIM(UPPER('Orange')) $ ALLTRIM(UPPER(field1)) ;
>.AND. 4=field3
>
...Yep, that's what I started with too, until I discovered that
there is a limitation of the compillation string. Imagine
having more than 15 fields to search for :) IT WILL NOT
COMPILE!!! That's why I suggested to go the SEEK-route.
More efficient search, can be controlled by SET NEAR ON/OFF...
Let's say after unsuccessful search, if you want to terminate
it to pick up a range of values, and than go for precise
matching, etc...
Some things are better be left unknown...NOT!!!