|
-
Nov 22nd, 2000, 11:59 AM
#1
Thread Starter
Lively Member
How do you get values from the selected item in a combo box?
I use this for a listbox but a combo doesn't have a .selected method.
Code:
For L = 0 To results.ListCount - 1
If results.Selected(L) Then
txtsomething = results.list(L)
End If
Next
Sure someone knows the answer since it is an easy question.
-
Nov 22nd, 2000, 12:03 PM
#2
Fanatic Member
Just use the text property.
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Nov 22nd, 2000, 01:02 PM
#3
Thread Starter
Lively Member
-
Nov 22nd, 2000, 01:28 PM
#4
New Member
Combo Box
You can also use the ListIndex to get the selected
Index. If you need the ItemData value for the selected
item use:
Id = Combo1.ItemData(Combo1.ListIndex)
Corby Nichols
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|