Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the properties of one form from another
Message
From
21/03/1997 14:58:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00025190
Message ID:
00025223
Views:
34
>I've heard that using PUBLIC variables is not a good idea, that it is better to use properties instead. I don't understand this. How do I set the properties of a form that is loaded from another form. For example, in the first form the user enter some data or checks some boxes and clicks OK. In the click event of the OK command box I want to load a form depending on what the user entered, and I want this form to have certain properties set depending on what the user selected.
>
>Is this information in the manual?
>
>Jeff


With two forms:
frm1 : Is the master form.
frm1.txtbox1 = Username field
frm2 : Is the child form.

In frm1.buttonOK.click()
_screen.frm2.txtbox1.value=this.parent.txtbox1.value
OR
_screen.frm2.txtbox1.value=_screen.frm1.txtbox1.value

I don't usually work with multiforms on a screen but I believe this is how to do it.

Gene Berger
Nationwide Warehouse & Storage
Columbus, OHIO
Previous
Reply
Map
View

Click here to load this message in the networking platform