Rafael Copquin wrote on 2014-11-05: 
>  In form A call form B thus:
>    do formB with thisform
>  in form B init method:
>  
>  ***init method
>  
>  lparameters toForm
>  
>  thisform.addproperty('oForm')
>  
>  thisform.oForm = toForm
>  
>  then in anymethod of form B you can call the formA method (assumed to be
>  called calculations) thus:
>  
>  thisform.oForm.calculations()
>  
>  Rafael Copquin
> 
>  El 05/11/2014 15:40, Desmond Lloyd escribió:
>  An odd question (perhaps)
>  
>  Old VFP6 Code,  do form A,  button on form A calls form B.  Is there a
way
>  in form B  that I can call a method from form A.
>  
>  Tried the link thing in the button calling form B in Form A,  but no joy.
>  Tried referencing the name of form A  frmmyfrm.mymethod in form B but it
>  complains that it cannot be find...
>  
>  Would be easy to create the same method in form B,  but would prefer
>  calling the same method in form B.
>  
>  Any suggestions or am I barking up the wrong tree....
>  
>  TIA/Regards,
>  Desmond
>  

Desmond,

The options given are nice, they work. However, if your Form B is not Modal,
then Form A could be closed, yet, not really since Form B has a reference to
it. If Form B is Modal, then you can simply call the method on Form A after
Form B is released.

You might be better putting this code in a Procedure file (or a Class that
can be added to the form) and called from both forms.


Tracy Pearson
PowerChurch Software


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to