Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox Problems
Message
From
04/09/1997 10:47:51
Frank Shaw
Runestones Development Corporation
Ipswich, Massachusetts, United States
 
 
To
02/09/1997 16:25:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00048090
Message ID:
00048504
Views:
20
>> Thanks For the Replay Edward but what I need to have more understanding is why does the combobox work allright with charactor data but numeric data seams to have a problem. Has anyone seen this problem before you browse through some records and if content in the field in defined as charactor for the field type and the contents in the actual field is numeric first couple of records are ok but after that value on the left side of the combobox shows blank records.



I have a combobox and if the data comes from a table where the record has a character defined field and the actual value is like 01. When doing a skip or going to next record the contents in the field does not show in the left side of the combobox do you have a idea as to what is or could be happening here. What properties would you use to bring in the value contained in the record for that field and what properties would you use to change back before writing value out to the record. The right side of the combobox has a pull down where the value do pull down fine. It is just the left side that seems to have the problem. Also I want to retrieve the second column in the pull down from a combobox what are the properties for the second column unstead of the first need to be set.
>
>There are two combo properties which you should use: Value and DisplayValue. If you have
>with Thisform.Combo1
>.ColumnCount=2
>.RowSourceType=6 && fields
>.RowSource="table1.name,id"
>.BoundColumn=2
>endwith
>Then Combo1.DisplayValue (actually shown in Text portion of the combo) will show Table1.Name and Combo1.Value (could be used for data editing session) will store Table1.Id.
>If you want to add new records to Table1 on fly, use following code (e.g. in Combo.Lostfocus event):
>Select Table1
>Set Order to Name
>Seek this.DisplayValue
>If Not Found()
>Insert into Table1 (id,name) values(getnewid(),This.displayvalue)
>Endif
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform