Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass a param to a form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01245888
Message ID:
01246024
Views:
31
>>>I want form2 to have the value of a var in form1, what is the way to accomplish this? Where does the parameter statement go? I have this in Form1:
>>>Publ zrec
>>>zrec=RECNO()
>>>DO FORM2 WITH zrec
>>
>>In addition to all others. When you define a variable as PUBLIC there is no need to pass it as parameter. That variable is accessible in all your routines from now on till you release it.
>
>That's what I initially thought but encountered errors. So you're saying all forms in a proj will recognize the publicly declared var zrec?

Yes, but it doesn't mean you should use such approach. The only 'global' object you may need is an application object.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform