J
John S. Ford, MD
I have a query based on the following tables and queries:
tblAdmissions, a table with primary key AdmissionIDNum and fields relating
to hospital admissions such as PatientIDNum, PatientAdmitDate,
PatientDischargeDate, etc. Each record corresponds to one exactly one
admission.
For each admission, there will be one or more attendings taking care of that
patient (patients can be transferred sequentially from one attending to
another). I therefore have a tblLINK_AdmissionAttending with a
one-to-many relationship linked by AdmissionIDNum which has additional
fields such as AttendingStartDate and AttendingEndDate.
I created a query (qryLastAttending) based on tblLINK_AdmissionAttending
using the DMax function that yields a single record for each admission and
provides the LAST attending for that admission (i.e. the attending for each
admission with the latest AttendingStartDate.
I then joined tblAdmissions with qryLastAttending using AdmissionIDNum as
the join field.
tblAdmissions, qryLastAttending and the resulting joined query are all
updateable.
Now in addition to having attendings sequentially take over the care of each
admitted patient, residents also sequentially care for the same patient. I
created a qryLastResident using the same technique described above and
linked it to the tblAdmissions (which was already joined by
qryLastAttending).
The resultant query IS NO LONGER UPDATEABLE. Does anyone know why and how I
can fix this?
John
tblAdmissions, a table with primary key AdmissionIDNum and fields relating
to hospital admissions such as PatientIDNum, PatientAdmitDate,
PatientDischargeDate, etc. Each record corresponds to one exactly one
admission.
For each admission, there will be one or more attendings taking care of that
patient (patients can be transferred sequentially from one attending to
another). I therefore have a tblLINK_AdmissionAttending with a
one-to-many relationship linked by AdmissionIDNum which has additional
fields such as AttendingStartDate and AttendingEndDate.
I created a query (qryLastAttending) based on tblLINK_AdmissionAttending
using the DMax function that yields a single record for each admission and
provides the LAST attending for that admission (i.e. the attending for each
admission with the latest AttendingStartDate.
I then joined tblAdmissions with qryLastAttending using AdmissionIDNum as
the join field.
tblAdmissions, qryLastAttending and the resulting joined query are all
updateable.
Now in addition to having attendings sequentially take over the care of each
admitted patient, residents also sequentially care for the same patient. I
created a qryLastResident using the same technique described above and
linked it to the tblAdmissions (which was already joined by
qryLastAttending).
The resultant query IS NO LONGER UPDATEABLE. Does anyone know why and how I
can fix this?
John