combo box display - Width vs. ListWidth

  • Thread starter Jim Burke in Novi
  • Start date
J

Jim Burke in Novi

I have a combo-box that is narrow (the control's Width property is .65")
because of limitations on my form. When you click on the arrow, it widens to
the ListWidth, which is 3.4". Is there any way to automatically have the list
expanded when the user enters the combo box (by tabbing or clicking) so that
the list is displayed with the ListWidth initially?
 
J

John Spencer

If you mean you want the combobox to automatically dropdown when the control
is entered. You can use the Dropdown method of the combobox.

Add the following VBA to the Enter property of the combobox.

Private Sub Combo6_Enter()
Me.Combo6.Dropdown
End Sub

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
R

RoyVidar

Jim Burke in Novi explained :
I have a combo-box that is narrow (the control's Width property is
.65") because of limitations on my form. When you click on the
arrow, it widens to the ListWidth, which is 3.4". Is there any way
to automatically have the list expanded when the user enters the
combo box (by tabbing or clicking) so that the list is displayed
with the ListWidth initially?


You could try to use the .DropDown method of the combo in the combos
OnGotFocus event,

Me!TheCombo.DropDown

but often I tell the users to learn how to use either Alt+DownArrow or
F4, which are standard Windows/Office shortcuts to achieve the same
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top