RCheesley
Registered User.
- Local time
- Today, 13:51
- Joined
- Aug 12, 2008
- Messages
- 243
Hi all,
I have a query which is working OK, but I want to add another query (the data needs to be in separate tables).
This code works:
But when I add the second query, it no longer works - in that, the query doesn't allow for new records to be added:
Pretty sure this is something daft (I am still learning access/sql) but anyone care to point out the obvious?
Many thanks in advance.
Ruth
I have a query which is working OK, but I want to add another query (the data needs to be in separate tables).
This code works:
Code:
SELECT tbl_patientdetails.[Patient ID], tbl_patientdetails.FirstName, tbl_patientdetails.Surname, tbl_patientdetails.NHSNo, tbl_patientdetails.DoB, tbl_patientdetails.Ethnicity, tbl_patientdetails.Address1, tbl_patientdetails.Address2, tbl_patientdetails.Town, tbl_patientdetails.County, tbl_patientdetails.Postcode, qry_referrer.ReferrerID, qry_referrer.RefFirstName, qry_referrer.RefSurname, qry_referrer.GPPractice
FROM tbl_patientdetails INNER JOIN qry_referrer ON tbl_patientdetails.NHSNo = qry_referrer.NHSNo;
But when I add the second query, it no longer works - in that, the query doesn't allow for new records to be added:
Code:
SELECT tbl_patientdetails.[Patient ID], tbl_patientdetails.FirstName, tbl_patientdetails.Surname, tbl_patientdetails.NHSNo, tbl_patientdetails.DoB, tbl_patientdetails.Ethnicity, tbl_patientdetails.Address1, tbl_patientdetails.Address2, tbl_patientdetails.Town, tbl_patientdetails.County, tbl_patientdetails.Postcode, qry_referrer.ReferrerID, qry_referrer.RefFirstName, qry_referrer.RefSurname, qry_referrer.GPPractice
FROM (tbl_patientdetails INNER JOIN qry_referrer ON tbl_patientdetails.NHSNo = qry_referrer.NHSNo) INNER JOIN qry_ipptreatments ON tbl_patientdetails.NHSNo = qry_ipptreatments.NHSNo;
Pretty sure this is something daft (I am still learning access/sql) but anyone care to point out the obvious?
Many thanks in advance.
Ruth