Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid - data transfer
Message
 
To
17/07/2000 11:28:30
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:
00393364
Views:
15
>>I am lost on this multiple parameter passing thing! I can't believe I don't understand this. Do I - Do searchgrid with nrecno, memvar1 ?? I need to save the recordnumber that I found in the searchgrid and evaluate a field to pass back a parameter. I keep getting errors everywhere I turn. nrecno not found or when I first open the inquiry program it can't find the memvar1 variable because I haven't searched for it in the grid. Also once I grab the record, I close the searchgrid form so how can I assign the thisform.oCallingForm=.null. before I release the searchgrid form - won't this wipe out the variables? I have two books here in front of me and neither explain this at all!!

>Cancel that...I finally got it to work, not sure what I did - but I'll figure it out later! Thanks so much for all of your help!!!!!

Just to clarify what is happening there.
When you pass the object reference you do not pass the object itself - just the reference. But using this reference you have an access to everything in your calling form. Calling form does not get wiped out when you assign thisform.oCallingForm = .null. - you just reset the property which contains the object reference so it does not point to the object anymore.

When you assign thisform.oCallingForm.somepropertyofcallingform = something
you change the property of the referenced object itself, so there is no need to pass the variables back. In your case the Inqury form will have that property set to the found RECNO() value, and some other property to another value. After you assign the found values to the Inquiry form properties you can simply close your SearchGridForm, for example with the code in SearchGrid.cmdClose.Click() event:

thisform.oCallingForm = .null. && you reset the object reference so it is not pointing to the real object.
thisform.release() && we close the Searchgrid form.
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
Reply
Map
View

Click here to load this message in the networking platform