what to do when combobox is too full

M

mcnews

what can i use instead of a combobox when it can't contain all of the
rows required by the user/client. my client needs a way to enter a
count for inventory items when they are found in an undocumented
location. so they need to ensure the item numbers are real and the
want to pull the description along as well.
i'm thinking continuous (sub) form. is there a better way.

please no lectures about what is *supposed* to be.....

tia,
mcnewsxp
 
R

Rick Brandt

mcnews said:
what can i use instead of a combobox when it can't contain all of the
rows required by the user/client. my client needs a way to enter a
count for inventory items when they are found in an undocumented
location. so they need to ensure the item numbers are real and the
want to pull the description along as well.
i'm thinking continuous (sub) form. is there a better way.

please no lectures about what is *supposed* to be.....

Provide a way for the user to supply a few starting characters and then
filter the ComboBox for rows that match those characters. In many cases
just a couple of characters can drastically reduce the number of rows
needing to be returned.

You can do this by prompting them in the GotFocus event or by having an
unbound TextBox near the ComboBox that supplies the characters.

An alternative could be used if the item numbers can be assigned to
categories of some type. Then the ComboBox can be set up to only show one
category at a time to reduce the row count.

Other than that a subform is about all I can think of.
 
J

Jeff Boyce

How have you determined that the combobox "can't contain all the rows
required..."?

That is, what symptoms are suggesting that it cannot?

I've seen some comboboxes with thousands of rows ... how many rows are there
in yours?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Douglas J. Steele

For the record, the limit to a combo box (or list box) is 65,536 rows, the
total number of distinct values that can be represented in 2 bytes.

That having been said, I'd say that's at least a hundred times more rows
than should be displayed in a combo box!
 
M

mcnews

For the record, the limit to a combo box (or list box) is 65,536 rows, the
total number of distinct values that can be represented in 2 bytes.

That having been said, I'd say that's at least a hundred times more rows
than should be displayed in a combo box!

isn't there also a limit to the number of characters?
 
D

Douglas J. Steele

Yes, there is a maximum length that the RowSource can be, but that should
only be relevant if you've got the RowSourceType set to Value List (unless
you've got a HUGE SQL statement!)

If you're encountering a limitation in that case, the best thing to do is
put your data into a table, rather than using a Value List.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


For the record, the limit to a combo box (or list box) is 65,536 rows, the
total number of distinct values that can be represented in 2 bytes.

That having been said, I'd say that's at least a hundred times more rows
than should be displayed in a combo box!

isn't there also a limit to the number of characters?
 

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