Combo Boxes

  • Thread starter Thread starter Donna Brooks
  • Start date Start date
D

Donna Brooks

I have a combo box that I use to select employees by last
name and it works great except for when I have two
employees with the last name. The combo box displays
Last name and first name. If you choose, for example
Brown Samuel and there's another brown in the db whose
first name comes before Samuel, it pulls that record. It
is easy for me to just hit the enter key or scroll to go
down to Samuel but it would be great for the users if it
could just pull the name you select. Anyone know what is
causing this?

Thanks,
Donna Brooks
 
Donna, there are a few different ways this problem can be approached. Is the combo box you're talking about one that you setup through the Access wizard that will take the form to the record selected in the combo box?

If so, then the last name must be the bound column, and when selecting a name, it's filtering or taking you to the first occurance of the last name. On your underlying table or query for your employees form, is there another field that is "unique" to each record? Like an autonumber field, or social security number for example. If so, then you can add that field to your combo box and make it the bound column. You can even have the unique field not show up the combo list, by setting the column width to zero for that field. That way when you select your example, Samuel Brown, it will look up that record based of of his/her unique field like a ssn or autonumber instead of their last name.

There are other ways to accomplish this as well. Let me know if I understood the problem correctly.
 
It worked great. Thanks.
-----Original Message-----
Donna, there are a few different ways this problem can
be approached. Is the combo box you're talking about one
that you setup through the Access wizard that will take
the form to the record selected in the combo box?
If so, then the last name must be the bound column, and
when selecting a name, it's filtering or taking you to
the first occurance of the last name. On your underlying
table or query for your employees form, is there another
field that is "unique" to each record? Like an
autonumber field, or social security number for example.
If so, then you can add that field to your combo box and
make it the bound column. You can even have the unique
field not show up the combo list, by setting the column
width to zero for that field. That way when you select
your example, Samuel Brown, it will look up that record
based of of his/her unique field like a ssn or autonumber
instead of their last name.
There are other ways to accomplish this as well. Let me
know if I understood the problem correctly.
 
Back
Top