
Cant Reference other Forms Properties
Quote:
>Shouldn't I be able to reference and change the properties of one form from
>another form? Example:
>Form1 is a customer lookup window
>Form2 is a customer data screen
>Shouldn't I be able excecute a command like this from form2:
> form1.caption="Don't let the door hit you on the way out"
>I've been able to do this with several other forms but I keep getting an
>error to the effect of "FORM1 is not an object." Is this a bug? Is there
>some funky behind the scenes naming convention going on?
"Form1" is the name of the form. It is not an object reference.
You need an object reference. Pass this to form2 so it can do this.
e.g.
refone=createobject("form1")
reftwo=createobject("form2",refone)
and pick up the parm in form2's .init():
procedure init
lparameters potherform
this.otherform=potherform && Be sure to def the property
and then you use
this.otherform.caption="Don't let..."
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.