refresh say object

Post Reply
Ehab Samir Aziz
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

refresh say object

Post by Ehab Samir Aziz »

How can I refresh the say object in variable oSay_acct down in the code
I am getting data from combpbox and then serach() the data to get display say variable

Code: Select all

@ 1,1 SAY "&Account Name" OF oDlg PIXEL
   @ 1,50 SAY ":" OF oDlg PIXEL
   @ 1,60 COMBOBOX V_CU_NAME ITEMS aBase1(1,"cust",256,"cu_name") size 150,120 OF oDlg PIXEL ;
ON CHANGE (search("V_CU_NAME","cu_name","cust"),oSay_acct:Refresh(),oDlg:Refresh())


   @ 1,300 SAY "&Account No." OF oDlg PIXEL
   @ 1,340 SAY ":" OF oDlg PIXEL 
   @ 1,350 say V_CU_ACCT  
   @ 1,350 say oSay_acct VAR V_cu_acct OF oDlg PIXEL;

...

function search(variable,field,filename)
//--------------------------------------
use (filename)
locate for (alltrim(variable) == alltrim((filename)->(field)))
if found()
(variable):=((filename)->(field))
? "I am inside search    " + variable
endif
return nil

Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

Try

Code: Select all

function search(variable,field,filename) 
//-------------------------------------- 
use (filename) 
locate for (alltrim(variable) == alltrim((filename)->(field))) 
if found() 
(variable):=((filename)->(field)) 
? "I am inside search    " + variable 
//

   oSay_acct:SetText( variable )
   oSay_acct:Refresh()

//
endif 
return nil
Ehab Samir Aziz
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Post by Ehab Samir Aziz »

program does not the search function . How can I involve a function into on change clause ?
Any other ideas about how can I reach my result ?

ON CHANGE (function_call,("V_CU_NAME","cu_name","cust"),oSay_acct:Refresh(),oDlg:Refresh())
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

You need this

Run a app TEST4.EXE and click in the button search.

http://www.shoppmarketing.com/forum/ehab.zip
Post Reply