A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Make Listbox behave like a combobox (sort of)



 
 
Thread Tools Display Modes
  #1  
Old December 20th, 2007, 07:43 AM posted to microsoft.public.access.forms
DocBrown
external usenet poster
 
Posts: 83
Default Make Listbox behave like a combobox (sort of)

I have a multiselect listbox. When the form opens, the list box height is
240, ie one line high. This makes my form with many listboxes compact until
the user wants to select an item in the listbox. I have the GotFocus event to
set the height to the number of items in the listbox (up to a max size of say
5 lines). The LostFocus event reduces the hight back to one line height.

My question is: If an item is selected, and the user clicks on a different
control, can I make a selected item the one that is visible in my one line
height, ie, set the scroll position?
  #2  
Old December 20th, 2007, 04:32 PM posted to microsoft.public.access.forms
Dale Fye
external usenet poster
 
Posts: 2,651
Default Make Listbox behave like a combobox (sort of)


Doc,

Check out Steve Leban's response to a similar question at:

http://www.thescripts.com/forum/thread538150.html

Steve is a wizard with list and other controls and has some cool stuff on
his website:

www.lebans.com

HTH
Dale
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



"DocBrown" wrote:

I have a multiselect listbox. When the form opens, the list box height is
240, ie one line high. This makes my form with many listboxes compact until
the user wants to select an item in the listbox. I have the GotFocus event to
set the height to the number of items in the listbox (up to a max size of say
5 lines). The LostFocus event reduces the hight back to one line height.

My question is: If an item is selected, and the user clicks on a different
control, can I make a selected item the one that is visible in my one line
height, ie, set the scroll position?

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.