refresh say object

refresh say object

Postby Ehab Samir Aziz » Fri Feb 23, 2007 4:02 pm

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  Expand view
@ 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

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

Postby Rochinha » Fri Feb 23, 2007 4:53 pm

Try

Code: Select all  Expand view
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
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Ehab Samir Aziz » Fri Feb 23, 2007 11:37 pm

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())
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Postby Rochinha » Sat Feb 24, 2007 1:28 am

You need this

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

http://www.shoppmarketing.com/forum/ehab.zip
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 30 guests