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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autofill Combo Box with First Item in List

Status
Not open for further replies.

Carrion

Technical User
Jul 26, 2002
27
US
Does anyone have a code that will auto fill a combo box, with the first item in its list?

I have a combo box looking up its info in a query, and that query is looking up info based on a field on the same form as the combo box. I want to have the combo box auto fill on lost focus.

thanks
 
Something like this ?
If yourCombo.ListIndex = -1 Then yourCombo.ListIndex = 0

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top