Allow a user to select a name from a long list

P

PaulM

I am about to create a database that will allow a user to view information
about an individual from a database of 2000+ records. The list of names will
be such that a list or combo box would be too long and unwieldy. On a form,
I want the user to begin entering the name required and for the name and
associated details to be revealed. Any help gratefully accepted.

Thank you for your help
 
R

Rick Brandt

PaulM said:
I am about to create a database that will allow a user to view information
about an individual from a database of 2000+ records. The list of names will
be such that a list or combo box would be too long and unwieldy. On a form,
I want the user to begin entering the name required and for the name and
associated details to be revealed. Any help gratefully accepted.

Couple ways to go...

You can overlay a TextBox on your ComboBox and use the Change event to count
characters entered. Once the desired count is achieved you take that text and
use it to apply a filter to the ComboBox RowSource, move focus to the ComboBox
and then drop the list. In most cases just a few characters is enough to make
the ComboBox list small enough to be manageable.

The above method is "slicker", but sometimes the management of counting
characters and moving focus can cause some undesired behavior. A cruder, but
more reliable method is to use the GotFocus event of the ComboBox to prompt the
user for a few characters with an InputBox and then afterwards do the same as
above regarding the RowSource and dropping the list.
 
L

Larry Daugherty

A list box will only be as large as you draw it. You'd have to scroll
to see other records.

A combobox will only show the default number of rows or the number
you've told it to display (Format | List Rows).
 
Top