General information
Category:
Coding, syntax & commands
>> 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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only