Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I return a value from a form?
Message
From
27/03/1997 12:58:38
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00025771
Message ID:
00025887
Views:
31
>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.

I think (I might be wrong) that when the UNLOAD event occurs, your table is already closed.
Maybe you can create a property in your form (say lcLastName) and in the QueryUnLoad event: ThisForm.lcLastName = ThisForm.lstLookUp.Value.

You can then in the UnLoad Event: Return Thisform.lcLastName

I hope I'm right or at least point you in the right direction...
Alexandre Nobre
Alpha Bytes Computer Corp.

Did you know that there are innocent people dying in East Timor?
It helps if you do...

I suppose you don't need glasses if you're able to read this line

Previous
Reply
Map
View

Click here to load this message in the networking platform