andy_dyer
Registered User.
- Local time
- Today, 09:54
- Joined
- Jul 2, 2003
- Messages
- 806
Hi,
I have this query
SELECT tblInput.Referrer, Count(tblInput.[Centre Code]) AS [Number of Referrals]
FROM [tblMental Health] RIGHT JOIN tblInput ON [tblMental Health].[Mental Health] = tblInput.Referrer
WHERE (((tblInput.[Referral 1 Received Date]) Between [Forms]![frmReportDates]![txtStartDate] And [Forms]![frmReportDates]![txtEndDate]))
GROUP BY tblInput.Referrer;
This picks up my Referrer ID instead of my Referrer Name.
It works ok in my form frmInput, as I can hide my ID column and it still displays the Name however because it is the ID that's stored in my table tblInput that is what my query picks up...
I know I missed something or mucked up the relationship, can anyone help me unmuddle this??
I have this query
SELECT tblInput.Referrer, Count(tblInput.[Centre Code]) AS [Number of Referrals]
FROM [tblMental Health] RIGHT JOIN tblInput ON [tblMental Health].[Mental Health] = tblInput.Referrer
WHERE (((tblInput.[Referral 1 Received Date]) Between [Forms]![frmReportDates]![txtStartDate] And [Forms]![frmReportDates]![txtEndDate]))
GROUP BY tblInput.Referrer;
This picks up my Referrer ID instead of my Referrer Name.
It works ok in my form frmInput, as I can hide my ID column and it still displays the Name however because it is the ID that's stored in my table tblInput that is what my query picks up...
I know I missed something or mucked up the relationship, can anyone help me unmuddle this??