Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default ListIndex for ComboBox

Status
Not open for further replies.

KingofSnake

Programmer
Jul 25, 2000
73
US
Sorry for posting another topic, but I don't think it's that hard of a question. I have a dropdown list combo box, with two items in it. How do I get the first item to be displayed when the form is loaded rather than forcing the user to pick one. I know how to do it at runtime, but I was hoping to do it at design time.
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
 
Hi

I don't think it's possible to display it at design time. It's also a bad idea to fill your combo at design time...but hey.
I don't think it's that hard to put

Combo1.ListIndex = 0

in the form load of your forms where you'd want that behaviour.

Of course you'd have to only do that if there is data in the combo box as that statment will cause an error.

Seasons greetings
caf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top