>Hi Sylvain,
> I am having the same problem with Jenny on "Transfer values from 1 form to another form!" and thanks God that I found your reply.
> But I don't understand when you said "In the second form, you save the reference to a property..", tell me what do you mean on that?
> And the three statements "MyForm.Init()
> LPARAMETERS toObject
> Thisform.MyProp = toObject"
> Where should we put those in? What are "toObject" and "MyProp"?
> Please be patient with me, can you explain more about it?
> Thank you so much in advance.
> Thanya.
Hi Thanya,
Sylvain means that if you call the form like
DO FORM myForm with thisform
you pass it the refernce to the calling form object.
When the second form initializes, in it's INIT() event it accepts the passed parameter in
LPARAMETERS toObject line and then saves toObject parameter variable to the form property in
Thisform.MyProp = toObject line (assuming that you added myProp property to you form (you can actually give it whatever name you want). You have to save the parameter into a form property because toObject variable will be released after INIT() event code finishes. If it is saved to a form property, then you can address it from any place in your form. You should also add the line
thisform.myProp = .NULL.
in form.Destroy() method.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison