Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is Editing in a Dropdown Combo possible?
Message
From
07/12/2001 10:00:48
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00591109
Message ID:
00591133
Views:
31
Thanks for the quick reply.

I appreciate your comments and concerns about modifying a value in the combobox and potentially affecting foreign table values. In my case, I don't need to be worried about this. I have the character field in one table and I simply wanted a way to show these values in a combobox and have the user make changes to the description if desired.

Mark, I'll take a look at your class.

>You would also have to select the Primary Key from the table. Select it as the second field in your query. Change the number of columns in the combo to 2, and the column widths to ###,0 so the second column does not display. If you really want to change the value of the choice, which I do not think you really want to do, then you have to locate that PK in the table, then do the replace.
>
>I think what you would really prefer to do is add that new value to the table instead of over-writing that choice in the source table. By over-writing this value, you have changed the value for every other record in the foreign table to that value. If you would like an example of how to add new values [choices] to the lookup table, download my Combo class from the UT downloads. Just do a search there on my UT ID [12473].
>
>>Is it not possible to make edits to a field that is attached as the controlsource of a Dropdown combobox?
>>
>>For example, if I have a character field, FLD, in table A and I put a combobox on a form. I then set the Style to 0-Dropdown Combo, RowSourceType to 3-SQL Statement, RowSource to "SELECT A.FLD FROM A INTO CURSOR C_TMP" and the ControlSource to A.FLD.
>>
>>In the Valid of the combobox I put:
>>
>>REPLACE A.FLD WITH THIS.DISPLAYVALUE
>>THIS.REQUERY()
>>THIS.REFRESH()
>>
>>When the form is run, I can edit the value shown in the combobox but it never shows in the dropdown list or in the text portion. Anyone have any suggestions to make this work?
>>
>>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform