Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 Tags
Subject: interactivechange
Thread ID: 189291 Message ID: 189291 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Other
Date: Thursday, August 14, 2008 9:39:28 AM         
   


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

ENTIRE THREAD

interactivechange Posted by mohammed qasem @ 8/14/2008 9:39:28 AM
RE: interactivechange Posted by Jun Tangunan @ 8/14/2008 10:13:21 AM
RE: interactivechange Posted by mohammed qasem @ 8/14/2008 10:49:10 AM
RE: interactivechange Posted by Jun Tangunan @ 8/14/2008 3:48:21 PM