Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox Capers
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00044699
Message ID:
00044832
Views:
33
>>>>If you are using a combobox that is bound to a field and you type something in the combobox, where does that value appear? When I look at the value property it is always "" unless I select an item from the list. I need to be able to either choose an item from the list or type in my own item (isn't that the definition of a combo-box?)
>>>
>>>Combo.DisplayValue
>>
>>I'm having the same problem!! And when my combobox loses focus, it's blank! Why?
>>
>>Elyse
>
>Because, you have to care about row soucre programmatically:
>*** Combo.Lostfocus event
>IF This.value<>This.DisplayValue
>*** add displayvalue to row source (or directly to field) here
>Endif

Elyse & Michael: To expand on Edward's answer (correct as usual, Ed) VALUE is related to the table/cursor/array that is the recordsource of the combo. DISPLAYVALUE, however, has to do with what's showing on the screen. This is easier to see with a two-column combo where the bound column is 2.

Personally, I've adopted the idea that's been tossed around recently for NOT having a combo bound if the user can enter data.

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform