Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send a variable to form?
Message
From
08/09/1999 13:57:46
 
 
To
07/09/1999 17:34:13
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00262206
Message ID:
00262495
Views:
20
>I have a code to filter the record from the table. Only selected record, I want to plot the graph in the form.
>
>How to pass the variable from the code to the form?
>

If you put a PARAMETER or LPARAMETER statement in the Initi method of the form, you can pass the value as an argument on the command line. If the value is needed outside of the Init, you'll want to create a form property and save it there, since the parameter will pass out of scope when the Init terminates.

To pass a parameter on the DO FORM command line:
cSomeKeyValue = <i> the value you want to pass</i>

DO FORM MyForm WITH cSomeKeyValue


*
*Init of MyForm - I assume you've defined a form property cMyKey
LPARAMETER tcParamValue
IF PCOUNT() > 0
   this.cMyKey = tcParamValue
ELSE
   this.cMyKey = NULL
ENDIF
>Thanks
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform