Another way would be to define TOTAL_AMT, TOTAL_COST and TOTAL_ITEM as properties of the FORM_INV form and pass the form object to the second form:
DO FORM FORM_INV_ITEM WITH THISFORM LINKED
In FORM_INV_ITEM.Init():
LPARAMETERS loForm
THISFORM.oForm = loForm && oForm is a property of the form FORM_INV_ITEM
You then access the properties like this:
THISFORM.oForm.Total_Amt = 0
HTH
>thanks for your reply, about "NO MORE .PRG"
>
>and i have question about variables
>
>FORM_INV is a form for entry the header data of INVOICE NOTE. there have a button (.CLICK) to call up "DO FORM FORM_INV_ITEM LINKED" for input its order itmes.
>
>i create some variables at FORM_INV --> THISFORM.INIT as below:
>*****
>public TOTAL_AMT, TOTAL_COST, TOTAL_ITEM
>TOTAL_AMT = 0
>TOTAL_COST = 0
>TOTAL_ITEM = 0
>*****
>
>but while i go into FORM_INV_ITEM those variables are not valid.
>(or at FORM_INV --> THISOFRM.SAVE those variables are not valid too. )
>SO i add a INVOICE.PRG file for the master program as below :
>
>INVOICE.PRG program as below :
>*****
>priv TOTAL_AMT, TOTAL_COST, TOTAL_ITEM
>TOTAL_AMT = 0
>TOTAL_COST = 0
>TOTAL_ITEM = 0
>do form FORM_INV LINKED
>READ EVENT
>*****
>
>SO.....i need to make a .prg for call up a FORM first, do i right !!??
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement