M
magicdds
I have a query based on a table with 2 columns.
PatientID LinkID PatientName
16 20 Joe(16)
25 16 Mary(25)
31 12 Tom(31)
27 20 James(27)
In a form I, I will have an unbound textbox. If I type in 16 in the textbox,
I want the query to produce a list of names:
Joe (since 16 is linked to 20 in record 1)
Mary (since 16 is linked to 25 in record 2)
James (since 16 is linked to 20 in record 1 and then
20 is linked to 27 in record 4)
In other words, if patient1 is linked to patient2, then patient1 is then
automatically linked to all the patients that patient2 is linked to, and visa
versa.
Is there some way to sort out the records to give me the desired list of all
patients that are directly, or indirectly linked to each other?
Thanks for any suggestions.
Mark
PatientID LinkID PatientName
16 20 Joe(16)
25 16 Mary(25)
31 12 Tom(31)
27 20 James(27)
In a form I, I will have an unbound textbox. If I type in 16 in the textbox,
I want the query to produce a list of names:
Joe (since 16 is linked to 20 in record 1)
Mary (since 16 is linked to 25 in record 2)
James (since 16 is linked to 20 in record 1 and then
20 is linked to 27 in record 4)
In other words, if patient1 is linked to patient2, then patient1 is then
automatically linked to all the patients that patient2 is linked to, and visa
versa.
Is there some way to sort out the records to give me the desired list of all
patients that are directly, or indirectly linked to each other?
Thanks for any suggestions.
Mark