Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with ComboBox
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00720787
Message ID:
00720798
Views:
9
Hi Eric,

You cannot display value in a combobox that isn't in it's RecordSource. BTW, DisplayValue is a property that stores value typed by user.

>Thanks for answering David.
>No. In this case, I am not adding the new value in the list. There are some predefined clients but if the user enter another value, I don't save it in the client table. So, when this occurs, the client name comes from my main table, not from the lookup table.
>
>>Eric,
>>
>>I never use cbos unless they are set to dropdown list, so I'm not sure if this helps or not. But after updating the RecordSource does explicitly calling the Requery() method of the cbo get the new value into the list?
>>
>>>I have a small application where the user can fill the field of the table mymaintable. When it comes to the client field, he can either select one of the values from myclienttable.name or enter a new one.
>>>The combo is set as 2-Alias (I tried 6-field with the same result) and the rowsource is set as myclienttable.name
>>>
>>>When the user add a new record, no problem: He can select within myclienttable.name or add manually a new value. When I save in my main table, I replace mymaintable.client with THISFORM.combobox.text that contains the proper value. So far so good.
>>>
>>>The problem is that, when I retrieve the record and I want to display it on screen, nothing appears when I take the good value from mymaintable.client and copy it in THISFORM.combobox.value. Unfortunately, I cannot copy it in THISFORM.Combobox.text since it is a readonly property.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform