N
Nona
Could someone please tell me what I am doing wrong? I am trying to create a
database to track medical appointments: Three tables: Patients (primary key
is Unique ID), Health Care Professionals (primary key is HCPID), and Apts
(primary key is autonumber). The only fields that are indexed are the primary
keys in each of the tables. The relationships are one patient to many apts.
(linked by the patient UniqueID) and one health care professional to many
apts. (linked by the HCPID.)
One query links the patient with the apt date and time. A second query links
the health care professional with the apt date and time. When I try to enter
new data, I get an erro saying it would create duplicates.
Here are the SQLs:
SELECT QryPatients.UniqueID, QryPatients.Name, QryApts.AptDate,
QryApts.AptTime, QryApts.AutoNumber, QryApts.HCPID
FROM QryPatients LEFT JOIN QryApts ON QryPatients.UniqueID = QryApts.UniqueID;
SELECT QrySchedule1.UniqueID, QrySchedule1.Name, QrySchedule1.AptDate,
QrySchedule1.AptTime, QrySchedule1.HCPID, QryHCP.HCPID, QryHCP.HCPName,
QryHCP.HCPAddress
FROM QryHCP LEFT JOIN QrySchedule1 ON QryHCP.HCPID = QrySchedule1.HCPID;
I will appreciate your help!
database to track medical appointments: Three tables: Patients (primary key
is Unique ID), Health Care Professionals (primary key is HCPID), and Apts
(primary key is autonumber). The only fields that are indexed are the primary
keys in each of the tables. The relationships are one patient to many apts.
(linked by the patient UniqueID) and one health care professional to many
apts. (linked by the HCPID.)
One query links the patient with the apt date and time. A second query links
the health care professional with the apt date and time. When I try to enter
new data, I get an erro saying it would create duplicates.
Here are the SQLs:
SELECT QryPatients.UniqueID, QryPatients.Name, QryApts.AptDate,
QryApts.AptTime, QryApts.AutoNumber, QryApts.HCPID
FROM QryPatients LEFT JOIN QryApts ON QryPatients.UniqueID = QryApts.UniqueID;
SELECT QrySchedule1.UniqueID, QrySchedule1.Name, QrySchedule1.AptDate,
QrySchedule1.AptTime, QrySchedule1.HCPID, QryHCP.HCPID, QryHCP.HCPName,
QryHCP.HCPAddress
FROM QryHCP LEFT JOIN QrySchedule1 ON QryHCP.HCPID = QrySchedule1.HCPID;
I will appreciate your help!