I am trying to produce a query that will produce all the selected treatment records for one patient only in my test database.
I am trying to edit an Access produced query to do this job for me, the query as it stands produces a list of all the patients who have received treatment and by who etc. as I explained before I only want one particular record. This is my query in SQL:
SELECT tblTreatment.TreatmentHistoryID, tblNurses.NurseID, tblNurses.Title AS tblNurses_Title, tblNurses.NFirst_Name, tblNurses.NSurname, tblDoctors.DoctorID, tblDoctors.Title AS tblDoctors_Title, tblDoctors.First_Name, tblDoctors.Surname
FROM tblTreatment INNER JOIN (tblDoctors INNER JOIN (tblNurses INNER JOIN tblInPatients ON tblNurses.NurseID = tblInPatients.NurseID) ON tblDoctors.DoctorID = tblInPatients.DoctorID) ON tblTreatment.TreatmentHistoryID = tblInPatients.TreatmentID;
I have tried adding WHERE [FirstName] = "Jack" but this produces a line of blnk cells.
would someone show me what my problem is.
Thanks
Charlie
I am trying to edit an Access produced query to do this job for me, the query as it stands produces a list of all the patients who have received treatment and by who etc. as I explained before I only want one particular record. This is my query in SQL:
SELECT tblTreatment.TreatmentHistoryID, tblNurses.NurseID, tblNurses.Title AS tblNurses_Title, tblNurses.NFirst_Name, tblNurses.NSurname, tblDoctors.DoctorID, tblDoctors.Title AS tblDoctors_Title, tblDoctors.First_Name, tblDoctors.Surname
FROM tblTreatment INNER JOIN (tblDoctors INNER JOIN (tblNurses INNER JOIN tblInPatients ON tblNurses.NurseID = tblInPatients.NurseID) ON tblDoctors.DoctorID = tblInPatients.DoctorID) ON tblTreatment.TreatmentHistoryID = tblInPatients.TreatmentID;
I have tried adding WHERE [FirstName] = "Jack" but this produces a line of blnk cells.
would someone show me what my problem is.
Thanks
Charlie