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

Can the list box portion of a combo box be automatically visible? 1

Status
Not open for further replies.

VictoriaWass

Programmer
Jul 14, 2001
12
0
0
GB
Can I force a combo box to automatically display its list box portion, without the user having to click on the little arrow? The combo box does exactly what I want, as in it searches dynamically down the list and highlights the match as the user types what they want to find, but my spec demands this list be visible from form load.
Any advice on alternative ways to approach this would be appreciated. I have drawn a blank on trying to use a datagrid.

Thanks!
 
Hey Victoria,

I hope I'm following what your asking. You can set your combo box to drop down automatically by using code.

[ComboBox].Dropdown

This will cause the combo box list to display without clicking the down arrow. You can pick the event you what to put this code under to get it to fire. I hope this was what you where asking,
 
I've implemented the dropdown command into the form load event, and it's working.
My next problem is that when I open the form, the left edge of the list box is not in line with the text box portion. Curiously, if I open the form from design view, it is in line. But when I call the form from another form, it is offset to the right. How can this be, and can I resolve it?

Thanks!
 
Hey Victoria,

I'm assuming your still talking about the combo box. One thought is go to your properties for the combo box and make sure the list width is the same as the width of the box itself. Maybe that will get everything to line up like you want it to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top