Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning data from a form
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00018006
Message ID:
00018034
Views:
40
>>In my form's INIT method I have the following code:
>>
>>PARAMETERS dStartDt, dEndDt, cTitle
>>ThisForm.dStartDate = dStartDt
>>ThisForm.dEndDate = dEndDt
>>
>>You can't use PARAMETER ThisForm.dStartDate....
>>
>>So, how can I keep the parameters "alive" once the INIT method completes?
>>
>>Sorry if I'm being thick headed :-)
>
>use properties in your subform. in your init, say
>
>thisform.subStartDate = dstartdt
>thisform.subEndDate = denddt
>
>they will then be available throughout this form.
>if you save the form as a class and use createobject(), you won't need to pass by reference. you can get the values after you exit the form by looking at these properties before releasing the form object...

You can also put the properties on your original form and pass just the form name. I do this with a FIND modal form class. The table, field and index tag names are on the original form as properties. If the form name isn't passed, or the form isn't available (shouldn't happen, but I'm the belt-&-suspenders type) then there's just a message box. I store an ID value to original form, but you could store multiple items.

Barbara P.
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform