>Hi,
>
>I have a property nlineno in the parent form, and I pass the form to the child form as follow
>
>
>do childrorm with thisform
>
>the child form init method
>
>lparameters opform
>
>I can display out the value of the opform.nlineno in the child form's init method,
>
>Messagebox(opform.nlineno)
>
>but I can't display out the value in the Button object in the child form's click method,
>it prompt me an error message, "object opform is not found", when I click the button in the child form.
>
>Why ?
In the ChildForm.Init( ) you need to store the object reference that gets passed in, otherwise it goes out of scope and is automatically released at the end of that method.
One way is to create a property of the child form e.g. ChildForm.ParentFormReference, then:
LPARAMETERS oPForm
This.ParentFormReference = oPForm
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up