Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interactivechange
Message
From
14/08/2008 03:59:05
 
 
To
14/08/2008 03:25:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01338786
Message ID:
01338790
Views:
12
Hi Mohammed,

as Agnes already mentioned, I also don't think that its a good idea to put such code into interactivechange.

How about simply 'use' the 'x2' table(?) and then just work with 'set filter to...' which reacts on the users input in interactivechange? You could create filters like 'set filter to (left(name1,2) == "An")' where "An" is the current Value of your textbox. And with each new character generate a new filter.

>hi all,
>
>this code below works under event lostfocus is there away to works under event interactivechange or rewrite it
>
>
>SET EXCLUSIVE off
>SET EXACT on
>SET TALK OFF
>SET NOTIFY OFF
>
>
>             lcName1 = alltrim(thisform.text1.value)
>             lcName2 = alltrim(thisform.text2.value)
>             lcName3 = alltrim(thisform.text3.value)
>             lcName4 = alltrim(thisform.text4.value)
>
>DO case
>
>    CASE lcName1<>"" AND lcName2 <>""   AND lcName3 <>"" AND lcName4<>"" AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName2)) >= 3 AND LEN(ALLTRIM(lcName3)) >= 3 AND LEN(ALLTRIM(lcName4)) >= 3
>           Select F4,F1,name4,name3,name2,name1 from x2 where   name1=lcName1 AND name2=lcName2 AND  name3=lcName3 AND  name4=lcName4;
>                                  into cursor lcResultTable
>
>
>    CASE lcName1<>"" AND lcName2 <>""   AND lcName3 <>"" AND lcName4=="" AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName2)) >= 3 AND LEN(ALLTRIM(lcName3)) >= 3
>           Select F4,F1,name4,name3,name2,name1 from x2 where   name1=lcName1 AND name2=lcName2 AND  name3=lcName3 ;
>                                  into cursor lcResultTable
>
>
>
>    CASE lcName1<>"" AND lcName2 <>""   AND lcName3 =="" AND lcName4==""  AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName2)) >= 3
>           Select F4,F1,name4,name3,name2,name1 from x2 where   name1=lcName1 AND name2=lcName2 AND  name3=lcName3;
>                                  into cursor lcResultTable
>
>
>
>    CASE lcName1<>"" AND lcName2 ==""  AND lcName3 =="" AND lcName4==""  AND LEN(ALLTRIM(lcName1)) >= 3
>           Select F4,F1,name4,name3,name2,name1 from x2 where name1=lcName1 ;
>                                  into cursor lcResultTable
>
>    CASE lcName1<>"" AND lcName2 ==""  AND lcName3 =="" AND lcName4<>""  AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName4)) >= 3
>           Select F4,F1,name4,name3,name2,name1 from x2 where name1=lcName1 AND  name4=lcName4;
>                                  into cursor lcResultTable
>
>
>
>    CASE lcName1<>"" AND lcName2 ==""  AND lcName3 <>"" AND lcName4==""  AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName3)) >= 3
>           Select F4,F1,name4,name3,name2,name1 from x2 where name1=lcName1 AND  name3=lcName3;
>                                  into cursor lcResultTable
>
>
>    CASE lcName1<>"" AND lcName2 ==""   AND lcName3 <>"" AND lcName4<>"" AND LEN(ALLTRIM(lcName1)) >= 3 AND LEN(ALLTRIM(lcName3)) >= 3 AND LEN(ALLTRIM(lcName4)) >= 3
>           Select F4,F1,name4,name3,name2,name1 from x2 where   name1=lcName1 AND name3=lcName3 AND  name4=lcName4 ;
>                                  into cursor lcResultTable
>
>
>
>  endcase
>
> GO top
>                                         thisform.Grid1.RecordSource="lcResultTable"
>                                         thisform.grid1.Visible=.t.
>
>
>
>thanks
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform