Neil
I'm not actually going to write the code but.
You will have to build up the search string in the same way you already are.
Detect if the second text box condition has been requested if it has add " AND " to you string and add in the second condition.
If you store "WHERE " as a seperate string then you can build a search condition which will allow either condition to be entered.
Nick
>Good Morning,
>
>I have a small program which looks up numbers in a table based upon some form criteria:
>
>
>LOCAL lcdesign
>
>DO CASE
> CASE thisform.combo1.displayvalue='='
> lcdesign="modacad.key3=thisform.text1.value"
> CASE thisform.combo1.displayvalue='$'
> lcdesign="modacad.key3$thisform.text1.value"
>ENDCASE
>
>SELECT * ;
>FROM ("U:\Data\modacad.dbf") ;
>WHERE &lcdesign ;
>order BY mainkey ;
>INTO CURSOR crssearch
>
>
>Text1 being the design number field. I have now added another field named Text2 which is the type. Basically the same design number can be added into the table several times based on the Type. Therefore how can I include the second field in my search so that if something is entered in this field it will search on the type AS WELL as the design number. If nothing is entered in the second field it will exclude this from the search.
>
>Many Thanks