S
Stuart Jack
Hi
I am building a database for patient information and am having a problem at
the earliest stage with the relationships. So far I have 3 main tables which
I want to join, 1st table "tblPatientData" contains - Autonumber field, CHI
field (which is the patients unique health number) and fields for the First &
Last name.
2nd table "tblPatientDatesRecord" contains several fields for the dates that
the patient was referred, sent for scan, placed on a list etc, as well as an
Autonumber field and again the CHI field.
3rd table is "tblTests", this stores the tests and dates of tests carried out,
again an Autonumber field, CHI field, Test field and TestDate field.
My problem I am coming up against is that I keep getting "No unique index
found for the referenced field of the primary table" message when I try to
join and enforce referential updtaes, deletes. If I play about with the
primary keys and indexes I have managed to join on one occaision and it
seemed to work, except that I could not enter the same patient on the system
more than once, as the CHI number was being used as a PK I guess, and that
may be something I need to be able to do.
I am a bit stumped at the moment and would appreciate being pointed in the
right direction, I have attached the mdb file in case it makes it easier to
see where I am going wrong.
Thanks
Stuart
I am building a database for patient information and am having a problem at
the earliest stage with the relationships. So far I have 3 main tables which
I want to join, 1st table "tblPatientData" contains - Autonumber field, CHI
field (which is the patients unique health number) and fields for the First &
Last name.
2nd table "tblPatientDatesRecord" contains several fields for the dates that
the patient was referred, sent for scan, placed on a list etc, as well as an
Autonumber field and again the CHI field.
3rd table is "tblTests", this stores the tests and dates of tests carried out,
again an Autonumber field, CHI field, Test field and TestDate field.
My problem I am coming up against is that I keep getting "No unique index
found for the referenced field of the primary table" message when I try to
join and enforce referential updtaes, deletes. If I play about with the
primary keys and indexes I have managed to join on one occaision and it
seemed to work, except that I could not enter the same patient on the system
more than once, as the CHI number was being used as a PK I guess, and that
may be something I need to be able to do.
I am a bit stumped at the moment and would appreciate being pointed in the
right direction, I have attached the mdb file in case it makes it easier to
see where I am going wrong.
Thanks
Stuart