Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid - data transfer
Message
 
To
14/07/2000 19:26:55
Tina Levensky
Siegfried, Crandall, Vos & Lewis, P.C.
Kalamazoo, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00388924
Message ID:
00392799
Views:
10
>Ok - something else came up on this. The main program (inquiry) calls the searchgrid program like this: do form c:\voterreg\searchgrid TO MyFoundRecno.
>When I find the record in my search, I need to evaluate a coded field and replace it with a word so the field is understood - so just a CASE statement. However, how do I set up a mem variable to store it to pass back to the calling form (inquiry). The original statement was DO...TO... I can't use two of those. How and where is it defined and then actually passed?

If you need to pass and return more than one variable then you may use the second way I talked about - pass the object reference:

DO searchgrid WITH thisform

Add another custom property oCallingForm to the SearchGrid form to store the object reference.

*SearchGrid.Init()
LPARAMETER toForm
thisform.oCallingForm = toForm

After you get your values just assign them to any property (which you may need to add to your Inquiry form) of oCallingForm, like:

thisform.oCallingForm.SomeProperty = myValue

Before you release SearchGrid form make sure that you assigned:

thisform.oCallingForm = .null.

When you return to your Inquiry form you will be able to use the values of those properties.

In this case you don't need to use DO FORM... TO... and return the value in .Unload() event

I also noticed that you use hardcoded path in your DO FORM... command. It is much more reliable to use just the form name, making sure that you form is in your application path.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform