Hi,
How do i select a particular value of a combobox?
Example
combo1.selectvalue(rset.field("id"))
I believe you understand what i mean. I bring data from database and want select it in combo.
Thanks
Hi,
How do i select a particular value of a combobox?
Example
combo1.selectvalue(rset.field("id"))
I believe you understand what i mean. I bring data from database and want select it in combo.
Thanks
Hi,
To select a particular item use ListIndex property
combo1.ListIndex = rset.field ( "id" )
Its enough, but to protect from errors
Dim iV as Integer
' To avoid Null of record and Convert it to integer
iV = Val ( rset.Fields( "id" ) & "" )
'Check the bounding condition
If iV >= 0 And iV < Combo1.ListCount Then
combo1.ListIndex = iV
End If
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.