L
ll
I am somewhat new to Access and am working on a form for a doctor that
will be used to gather patient data. There are three linked tables:
Patients, Visits, and PatientAddresses. The patient table's PatientID
key is related in a one to many relationship to the visits table's
v_PatientID foreign key. This has worked well in relating the patient
data to the visits data. The doctor then added the idea of keeping a
"historic" listing of patient addresses, keeping the address at the
time of the visit associated with that visit through a numeric
identifier. So, my thought was to add a PatientAddresses table with a
pa_PatientID foreign key. However, in setting up the query for the
form, once the form is run, even though all data displays ok, new data
cannot be input. The "Recordset Not Updateable" message appears.
Here is the SQL for the form query:
SELECT Patients.*, Visits.*, PatientAddresses.*
FROM (Patients LEFT JOIN Visits ON Patients.p_ID = Visits.v_PatientID)
LEFT JOIN PatientAddresses ON Patients.p_ID =
PatientAddresses.pa_PatientID;
I'm wondering if a separate form for Patient Addresses would help this
situation (if the problem is too many tables in one query)? If
Patient Addresses data could populate (admittedly redundant) fields in
the Visits table, then would that be workable?
Thanks for any help or resources in this,
Louis
will be used to gather patient data. There are three linked tables:
Patients, Visits, and PatientAddresses. The patient table's PatientID
key is related in a one to many relationship to the visits table's
v_PatientID foreign key. This has worked well in relating the patient
data to the visits data. The doctor then added the idea of keeping a
"historic" listing of patient addresses, keeping the address at the
time of the visit associated with that visit through a numeric
identifier. So, my thought was to add a PatientAddresses table with a
pa_PatientID foreign key. However, in setting up the query for the
form, once the form is run, even though all data displays ok, new data
cannot be input. The "Recordset Not Updateable" message appears.
Here is the SQL for the form query:
SELECT Patients.*, Visits.*, PatientAddresses.*
FROM (Patients LEFT JOIN Visits ON Patients.p_ID = Visits.v_PatientID)
LEFT JOIN PatientAddresses ON Patients.p_ID =
PatientAddresses.pa_PatientID;
I'm wondering if a separate form for Patient Addresses would help this
situation (if the problem is too many tables in one query)? If
Patient Addresses data could populate (admittedly redundant) fields in
the Visits table, then would that be workable?
Thanks for any help or resources in this,
Louis