Jack
|
| Posted: 02/28/2002, 6:01 AM |
|
Dear Sir,
I need to pass a variable from one form to another in the same
page.
For example, I had a total_amount field in form1 and I had a sub_total field
in form2.
If I want to set a variable : iTotal = iTotal + CLng (fldsub_total) in
form2 at "before show" event,
how do I pass iTotal from from2 to form1 and put it in total_amount field ?
Form1 and form2 are in master/detail page(3pages, in 2nd page).
I try to set a variable iTotal in form1 "input --> parameter" and set
corresponding field as "total_amount"
and checked the checkbox "Transfer". But I still could not pass the
parameter.
Would you please give me some instructions to do this ?
Thanks !
Jackson
|
|
|
 |
Alexey Alexapolsky
|
| Posted: 02/28/2002, 8:25 AM |
|
To pass variable between forms you should
1) Declare a container variable at outer level , e.g. in Page/Open event :
dim sub_total
2) In Before show event of 1st form : sub_total = iTotal 'save it
3) In Before show event of 2nd form : fldtotal_amount = sub_total 'use it
--
Alex
CodeCharge Developer
"Jack" <jack38@ms10.url.com.tw> wrote in message
news:a5ld7i$58u$1@news.codecharge.com...
> Dear Sir,
>
> I need to pass a variable from one form to another in the same
> page.
> For example, I had a total_amount field in form1 and I had a sub_total
field
> in form2.
>
> If I want to set a variable : iTotal = iTotal + CLng (fldsub_total) in
> form2 at "before show" event,
> how do I pass iTotal from from2 to form1 and put it in total_amount field
?
>
> Form1 and form2 are in master/detail page(3pages, in 2nd page).
>
> I try to set a variable iTotal in form1 "input --> parameter" and set
> corresponding field as "total_amount"
> and checked the checkbox "Transfer". But I still could not pass the
> parameter.
>
> Would you please give me some instructions to do this ?
>
> Thanks !
>
> Jackson
>
>
>
>
>
>
|
|
|
 |
|