Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I return a value from a form?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00025771
Message ID:
00026273
Views:
29
>>I am using a form with a listbox and 2 command buttons (OK & Cancel) on it as a lookup.
>>
>>From my active form I call the form like so:
>>
>>DO FORM LookupForm TO mcreturnval.
>>
>>LookupForm is set to MODAL and in the Unload event of the form I have the line RETURN THISFORM.lstLookup.Value. The listbox uses fields Lastname, Firstname and is Bound to Lastname. When the lookup form closes mcretval=.T. instead of the name I chose. What am I missing.
>
>On your LookupForm create a form property NewValue and store This.Value to ThisForm.NewValue. You can then release your form. In your unload method return ThisForm.NewValue.
>
>This may not be the best way but it sure works well for me.
>
>DJ :o)

DJ,

Thanks for the tip, it works great!

Colin
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform