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!

Hiding the drop-down arrow on a combo box

Status
Not open for further replies.

ind

Programmer
Mar 9, 2000
121
US
I want to use a command button to make a combo box visible and drop-down automatically in front of a text without using the drop-down arrow. If this is possible, how do I do it.
 
This does not drop down a combo box.<br>
But did you know you can select items in there when it has focus by pressing letter keys. Such as the letter &quot;D&quot; will find something that begins with the letter &quot;D&quot; and you can then use the down arrow key to move down all the while viewing the items in the box. <p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Jim Enlighten us.<br>
This does not work.<br>
<br>
Private Sub Text14_Exit(Cancel As Integer)<br>
SendKeys F4, True<br>
End Sub<br>
<br>
I have a text box above the combo, so when I hit the TAB key I want to dropdown the combo.<br>
<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
1. Use the button's OnClick event to do a .SetFocus on the combo box control.<br>
2. Call the combobox's .DropDown method in it's own OnGotFocus event.<br>
<br>

 
I tried the .dropdown, it popped the box open then closed. The below has always worked for me, use the False in sendkeys in this situation.<br>
In the Lost Focus or wherever you're ready to go to the combo box:<br>
Me!mycombo.SetFocus<br>
SendKeys &quot;{F4}&quot;, False<br>
<br>
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top