Drop-down list box not available in toolbox

G

Guest

(prologue) I have a "search" textbox where once a string is entered, a
listbox is created with all the records that are LIKE the string from the
textbox.

Issue: I want a dropdown list box instead of a list box, but I only seem to
have a combo box icon and a list box icon in my toolbox (nor is a
"drop-down"option available in the add/remove buttons or the more controls".)
I don't want the user to be able to enter text in this box, only to select
from a drop-down list. Is there some property on the combo box that controls
the text entry? I'm using Access from Office Professional 2003.

thanks, Amanda
 
R

Rick Brandt

Amanda Byrne said:
(prologue) I have a "search" textbox where once a string is entered, a
listbox is created with all the records that are LIKE the string from the
textbox.

Issue: I want a dropdown list box instead of a list box, but I only seem to
have a combo box icon and a list box icon in my toolbox (nor is a
"drop-down"option available in the add/remove buttons or the more controls".)
I don't want the user to be able to enter text in this box, only to select
from a drop-down list. Is there some property on the combo box that controls
the text entry? I'm using Access from Office Professional 2003.

thanks, Amanda

There is no such control in Access. If you set LimitToList to yes on a ComboBox
then the user can still type in the control but only to facilitate navigating to
a choice in the list. You can set the width of the ComboBox so that all that is
shown is the drop down arrow to get more or less the effect you want. Just be
sure to set the ListWidth to something appropriate.
 
G

Guest

Rick, thanks for the swift response.

OK, the Access Help seemed to indicate that a drop-down list box was an
option.

So if I have a Combo box that generates a list of values based on the text
string entered in a separate text box, is there a way to set the default
value of the combo box to the first item in the recordset? also, can I force
the drop-down selections to stay open until one is selected?

thanks again, Amanda
 
R

Rick Brandt

Amanda Byrne said:
Rick, thanks for the swift response.

OK, the Access Help seemed to indicate that a drop-down list box was an
option.

So if I have a Combo box that generates a list of values based on the text
string entered in a separate text box, is there a way to set the default
value of the combo box to the first item in the recordset? also, can I force
the drop-down selections to stay open until one is selected?

You cannot make a ComboBox stay dropped if it loses focus so the answer is NO to
the second part. For the first use code...

Me.ComboBoxName = Me.ComboBoxName.Column(0,0)
 
G

Guest

Thanks, this works adequately!

Rick Brandt said:
You cannot make a ComboBox stay dropped if it loses focus so the answer is NO to
the second part. For the first use code...

Me.ComboBoxName = Me.ComboBoxName.Column(0,0)
 

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