Combo Box only returns the first of same LastName records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box to select a record for a form based on LastName. If
mulitple records have the same lastname, only the first record will be
selected. Clicking the other same-LastName records will not select the
record. It only returns the first record.

Any help will be appreciated.

Foxy
 
I suspect you are searching on just the last name rather than a unique ID number
for the person. Does the person have an ID number on which you could search?

I have a combo box to select a record for a form based on LastName. If
mulitple records have the same lastname, only the first record will be
selected. Clicking the other same-LastName records will not select the
record. It only returns the first record.

Any help will be appreciated.

Foxy
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
When you have in a combo the same selection, it will always jump to the first
record in the list, to overcome this problem, you need to bound the combo to
the key field of the table where the name are stored, and not to the last
name as it is now.

If you store the last name in the form, how can the record know, the next
time you open this form which record you selected, and this is why you need
to save the key field, that doesn't repeat it self
 
You need to bound the Id field to the field in the form, you don't have to
display the ID, set the column width to 0;3 so the Id field wont display in
the list but will be stored in the table
 
Thanks for the reply. I created the form based on a query. The combobox
also based on the same query as the form. Yes, the person has an ID number
but I want to allow the user to select based on the LastName. The ID number
is also in the form query. I included the ID number in the combobox's select
query but it does not work.

Should I use the table where the ID number and LastName reside in the
combobox?

Foxy
 
Thanks for the reply. I created the form based on a query. The combobox
also based on the same query as the form. Yes, the person has an ID number
but I want to allow the user to select based on the LastName. The ID number
is also in the form query. I included the ID number in the combobox's select
query but it does not work.

Should I use the table where the ID number and LastName reside in the
combobox?

Foxy
 
In addition to the comments that your first column should be the "id" field,
the other thing is to turn off the autocorrrect option for that comb box (if
you don't, then it select the first of the bunch. This is "sort of" a
bug....

so, set the "auto correct" in the other properties tab to no. If you don't
do this, then even the suggestion to use the id as the first column can
still often mess up....
 
Thanks. It works!

Ofer said:
You need to bound the Id field to the field in the form, you don't have to
display the ID, set the column width to 0;3 so the Id field wont display in
the list but will be stored in the table


--
The next line is only relevant to Microsoft''s web-based interface users.
If I answered your question, please mark it as an answer. It''s useful to
know that my answer was helpful
HTH, good luck
 
Thanks for the heads up Albert. Spot on as usual.

Thanks for the tip.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Are you searching on a unique ID rather than the last Name?

I tried this and I still only get the first record with the same lastname.
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
I am using the lastname. The user uses the Combobox as a pulldown of
members (lastname). A unique ID would probably not make sense for them. It
sounds like I need to use a unique ID here somewhere...btu how would that
work allowing the user to still pulldown and view the lastname?

Thanks in advance!
 
Go back and read all of this thread. Ofer described how to do it.

I am using the lastname. The user uses the Combobox as a pulldown of
members (lastname). A unique ID would probably not make sense for them. It
sounds like I need to use a unique ID here somewhere...btu how would that
work allowing the user to still pulldown and view the lastname?

Thanks in advance!
_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Back
Top