PC Review


Reply
Thread Tools Rate Thread

combo box display - Width vs. ListWidth

 
 
Jim Burke in Novi
Guest
Posts: n/a
 
      7th Aug 2008
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?
 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      7th Aug 2008
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

Jim Burke in Novi wrote:
> 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?

 
Reply With Quote
 
RoyVidar
Guest
Posts: n/a
 
      7th Aug 2008
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

--
Roy-Vidar


 
Reply With Quote
 
Jim Burke in Novi
Guest
Posts: n/a
 
      7th Aug 2008
That's it. I missed that method when I looked thru the list. Thanks.

"John Spencer" wrote:

> 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
>
> Jim Burke in Novi wrote:
> > 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?

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display width and table width perhaps i am incompetent? Microsoft Frontpage 5 28th Apr 2009 07:20 AM
dropdownlist expand display width not control width Ganesh Microsoft ASP .NET 0 16th Nov 2007 05:22 PM
ComboBox listwidth to match text in list J.S.Winstrom Microsoft Excel Programming 20 4th Aug 2007 05:16 AM
ListWidth and ColumnWidths =?Utf-8?B?SVRfcm9vZmVy?= Microsoft Excel Programming 0 31st Jul 2007 05:04 PM
ComboBox.ListWidth question Joepy Microsoft Excel Programming 1 5th Sep 2003 04:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 PM.