drop down box?

L

Larry

Is the combo box tied to a value list or a table/query? A drop down tied to a
table/query should display thousands of items for you. I'm not sure about the
value list, but more than 25 should be no problem.

Larry
 
J

Jeff Boyce

Where?

Since you posted in the tablesdbdesign newsgroup, are you trying to use a
drop-down/lookup field in a table? If so, don't! (check this newsgroup and
mvps.org/access for reasons not to)

Good luck

Jeff Boyce
<Access MVP>
 
J

John Vinson

how many items may be placed in a drop down box? Can it hold more than 25
items?

A "Combo Box" control (the proper name) based on a table or query can
have 65536 rows - far more than would be user friendly in my opinion!

Do take the advice elsewhere in this thread to NOT use a combo box in
a table datasheet; indeed, don't use table datasheets for much of
anything other than debugging. Instead use a Form (on which you can
easily put a combo box) to interact with your data.

John W. Vinson[MVP]
 
M

marylou7

We are developing a form where we need to add a drop down box for many
choices. I guess I am not very technical with this question.
 
J

John Vinson

We are developing a form where we need to add a drop down box for many
choices. I guess I am not very technical with this question.

Well... that's just what a combo box is for, at least for appropriate
values of 'many' (as a rule if you have five or fewer a Listbox or
Option Group may be better for the user; if you have 2000 or more, a
combo box may be too inconvenient for the user).

It's a bit hard to advise without knowing a bit more about your
requirements!

John W. Vinson[MVP]
 
M

marylou7

We are developing a form and one of the drop down boxes needs to contain
about 50 items. The lady that is doing this is using 2003. She tried the
above web site and keeps getting an error ('Load data into ComboBox error).
It worked for me fine, but I used 2002 (XP).
Mary Lou
 
J

Jeff Boyce

While you can (technically) "add items to a combo box", what you end up with
is a list of items embedded within the properties of that combo box. This
makes the list more difficult to maintain/edit.

A common way to handle a combo box/drop-down box is:
* first, be working in a form, not directly in a table.
* next, create a new table to which you can add new items, edit existing
items, etc.
* now create a form and add a combo box. When prompted by the combo box
wizard, point to the new table from which you'll be looking up valid choices
in your combo box. (even more preferred, first create a query based on that
'lookup' table and use the query as the row source for the combo box)
* to limit the user to only selecting items from that combo box's list,
set the LimitToList property.
* to give the user the ability to add new items to the list WHILE using
the combo box, create an procedure to run in the combo box's NotInList
event -- this will require some coding.

Check Access HELP on combo box, LimitToList, NotInList for examples of
required syntax & code.

Good luck

Jeff Boyce
<Access MVP>
 
J

John Vinson

We are developing a form and one of the drop down boxes needs to contain
about 50 items. The lady that is doing this is using 2003. She tried the
above web site and keeps getting an error ('Load data into ComboBox error).
It worked for me fine, but I used 2002 (XP).

You say "the above web site" but I see no reference to any website -
nor do I know of any reason to use a website to create a combo box.
Could you explain?

Normally one would simply create a small "lookup" table with one field
(the values that you want to insert), or perhaps two (an autonumber ID
and the text field); manually type in the 50 rows; and use the table
as the Row Source of a combo box. It seems you're doing something
else, but I cannot dope out what!

John W. Vinson[MVP]
 

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