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

Combo Box - Reset to first item

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I have tried almost every permutation, ie Combo1.Listindex=-1, setting focus to it etc, but the stupid thing just sits there. Any ideas please!!, it's driving me up the wall.
 
Thanks Alan. Sorry, I realised after hitting the submit post button, I am trying to reset the list of items shown in the combo to the top item, having no selection highlighted, and a blank top text entry box ready for a users entry. Hope thats clear, so I was using Combo1.Listindex=-1. Sometimes it works, sometimes it does nothing. Is there a procedure?, ie setfocus to it first. Many thanks for comming back. Regards
 
Have you tried

cboCombo.Text = ""
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Thanks Alan,Cajun, the combination of Combo1.Listindex=0 and Combo1.Text="" and a setfocus gave me exactly what I wanted. Be so nice if controls through other applications had similarity. Many thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top