Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using 2 Search Fields
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00810124
Message ID:
00810126
Views:
13
Neil,
Glad to see you got it working.
You could try an extension of the original thread.
lcWhere="modacad.key3"+thisform.combo1.displayvalue+"thisform.textbox1.value"
if !empty(ThisForm.Textbox2.value)
  lcWhere = lcWhere + " and modacad.type=ThisForm.textbox2.value"
endif
SELECT * ;
FROM ("U:\Data\modacad.dbf") ;
WHERE &lcwhere ;
order BY mainkey ;
INTO CURSOR crssearch
Does that help?
Caroline


>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
Caroline
Previous
Reply
Map
View

Click here to load this message in the networking platform