List box that acts like a combo box?

  • Thread starter Thread starter Tara
  • Start date Start date
T

Tara

I need to create a multi-select list box, however due to
space constraints, it needs to be rather small. It would
be helpful however, if the user could see the selections
they have already made, rather than only being able to
see one choice at a time. Is there any way to make the
list box drop-down like a combo box when the user clicks
on it?

Thanks in advance for any help!
Tara
 
Me.Combo228.Dropdown
put this in the gotfocus or the enter event of the control
-----Original Message-----
From: Tara [mailto:[email protected]]
Posted At: Friday, March 19, 2004 11:35 AM
Posted To: forms
Conversation: List box that acts like a combo box?
Subject: List box that acts like a combo box?


I need to create a multi-select list box, however due to
space constraints, it needs to be rather small. It would
be helpful however, if the user could see the selections
they have already made, rather than only being able to
see one choice at a time. Is there any way to make the
list box drop-down like a combo box when the user clicks
on it?

Thanks in advance for any help!
Tara
 
Tara

You could take advantage of the GotFocus and LostFocus events to change the Height property of the listbox

For example

In the GotFocus event of the listbox, put in the following code: List0.Height = List0.Height *
In the LostFocus event of the listbox, put in the following code: List0.Height = List0.Height /

(Obviously, substitute the name of your listbox for List0 in the snippets above.

Now, whenever the user enters the list box, it's height will expand by a factor of 3, and when the user exits it, it will return to it's normal size

Hope this helps

Eric Lev

----- Tara wrote: ----

I need to create a multi-select list box, however due to
space constraints, it needs to be rather small. It would
be helpful however, if the user could see the selections
they have already made, rather than only being able to
see one choice at a time. Is there any way to make the
list box drop-down like a combo box when the user clicks
on it

Thanks in advance for any help
Tar
 
Worked perfectly! Thanks!!
-----Original Message-----
Tara,

You could take advantage of the GotFocus and LostFocus
events to change the Height property of the listbox.
For example:

In the GotFocus event of the listbox, put in the
following code: List0.Height = List0.Height * 3
In the LostFocus event of the listbox, put in the
following code: List0.Height = List0.Height / 3
(Obviously, substitute the name of your listbox for List0 in the snippets above.)

Now, whenever the user enters the list box, it's height
will expand by a factor of 3, and when the user exits it,
it will return to it's normal size.
 
Back
Top