How to reference a row in a dropdown?

  • Thread starter Thread starter Laurel
  • Start date Start date
L

Laurel

I want to load a combo box with the contents of the first row in its list.
How do I reference that row? I know that I can reference a column from the
loaded data (<combobox>.column (<col number>), but I don't see anything for
"row" in the list after I type the dot.
 
Laurel said:
I want to load a combo box with the contents of the first row in its list.
How do I reference that row? I know that I can reference a column from the
loaded data (<combobox>.column (<col number>), but I don't see anything for
"row" in the list after I type the dot.

Me.Combo1.Value = Me.Combo1.ItemData(0)
 
Thanks! I actually had two items in the list box, and it took me a little
while to figure out that both of them were getting loaded.

gv_variant = Me.Combo1.ItemData(0) - gv_variant seemed to be equal to only
the first item in the list box

gv_variant = Combo1.Column(0) - gv_variant looked the same as above
But
gv_variant = Combo1.Column(1) - gv_variant was equal to me second item.

Thanks again!
 
Back
Top