List Box and Duplicate Entries

Deirdre Marie

Access in Excess
Local time
Today, 21:41
Joined
Sep 17, 2001
Messages
34
Greetings~

I have created a database to store information regarding number of donations and dates by each patient.

I have created a List Box to quickly look up a patient's information in order to update it. I used [LastName], [FirstName], [M], [BloodType] as identifying information based on a ascending sorted query.

I have just discovered if I have patients with the same last name, that only ONE of them will be displayed in the form for updating. For instance, in the list box one will see:

Doe John P A-Pos
Doe Jane Q A-Neg

If I click on Jane's information in the list box, the information DISPLAYED in the form will be for John. If I click on John's information in the list box, it will also display John's information in the form.

Please advise on how I may use a list box to accuartely display information on a form when the main identifier (Last name) will have duplicates. I did not opt to use a "Key ID" when creating the table. Would this solve this problem?

Thank you very much in advanced

~Deirdre
 
You simply need to use the patients ID number as the bound column and then make it's width 0 so you don't see it.
What is happening is that your list box has no indexed, unique field to look for and is selecting the first "Doe" it is finding.
Just add the ID to your query and it should work fine.
 
Thank you ever so much!

Had I allowed the use of the Primary Key in the beginning, I wouldnt have pulled out my hair
wink.gif


:: cheers ::

~Deirdre
 

Users who are viewing this thread

Back
Top Bottom