Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox problem
Message
 
 
To
30/08/1996 22:37:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00007044
Message ID:
00007085
Views:
33
>Im using a listbox on a modal form to return a value to a
>calling form and it isnt working.

There are several easy ways:

1. If the Tag or Comment fields of the form are not going to be used, use one of them to hold the value:
In ListBox.DoubleClick: Thisform.Tag=This.List(This.ListIndex), or even simpler: Thisform.Tag=This.Value
In myForm.Unload: Return This.Tag

2. Create a new form property (i.e., "myProp").
In ListBox.DoubleClick: Thisform.myProp=This.List(This.ListIndex), or even simpler: Thisform.myProp=This.Value
In myForm.Unload: Return This.myProp

3. Declare a memory variable before DOing the form, initialize it to an empty string, and use the memory variable as the ControlSource for the Listbox. For future reference, with this technique the form doesn't have to be modal.
Previous
Reply
Map
View

Click here to load this message in the networking platform