Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox
Message
From
26/10/2006 10:40:29
 
 
To
26/10/2006 10:29:54
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01164676
Message ID:
01164714
Views:
11
Agnes

I'm not sure I understand your terminology here. Myself, I've not had much experience of adding a newly typed-in value to a drop-down list/combo, when the list is already populated from an SQL statement.

Hence, for the above 2 reasons, I can only suggest what I already have, and, in the .Valid event, add to the list this.value, and refresh the list. ???

>Hi Terry,
>
>::(
>
>I see. but ...
>
>Lets see if I can describe the problem.
>
>Style is 0
>
>I have a combobox that works as a pickup. The values that are pickable for the record are depending on that record.
>(I have material and need all the heats for that material) but I can enter a new heat - thats the point when I enter a string that is not part of the sql. As long as I do not move the record in my 'work' table all is fine.
>If I move my record I reload the sql (new material) but I will keep the code that is entered. (For useres convenience) It should not be part of the underlying pickupdata as long no further action is been taken. IOW it should not be in the list because that would mean it's an heat already entered.
>(In reality I use the information !EMPTY(.TEXT) and EMPTY(.VALUE) to determine if I must create new data in pickup.)
>
>What I need is to change the data but keep the string that is not part of the data in display.
>
>
>Agnes
>>Agnes
>>
>>If I read you correctly:
>>
>>1) I presume the combo's .Style is 0 - dropdown combo
>>
>>2) You can SQL select the combo's items into an array, combobox's .RowSourceType = 0, then use .List.AddListItem etc. to populate the combo. Then .AddListItem to programmatically add the extra values
>>
>>HTH
>>
>>Terry
>>>Hi all,
>>>
>>>can somebody give me a clue how to set the text>/em> for a combobox programitcally?
>>>
>>>I have the following situation
>>>- A combobox bount to a sql statement (RowSourceType= 3)
>>>- Valid data in sql's result
>>>
>>>I like to set the combobox to a value not in the sql result
>>>
combo.value='somevalue'
sets the value to the literal, but it's not on display and .TEXT holds the empty string.
>>>If I enter the value with the keyboard .TEXT gives me the value I've entered and value stucks wher it was (this one I can deal with).
>>>
>>>How canm I get the text in the combo?
>>>
>>>Agnes
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform