Re: FN-FORUM: More SQL Help
date posted 13th January 2007 12:57
and to totally bore everyone I missed out the date quotes and got my
less than dend date as a greater than. So this works:
strSQL1 = "SELECT tblSurveys.SurveyID, tblSurveys.SurveyName,
tblGroups.SurveyID, tblGroups.LicenseeID, tblLicensees.LicenseeID,
tblScores.ScoreID, tblScores.GroupID, tblScores.GeneratedDate,
tblGroups.SurveyID, tblGroups.LicenseeID, COUNT(tblSurveys.SurveyID)
AS NumScores FROM tblSurveys INNER JOIN ((tblLicensees INNER JOIN
tblGroups ON tblLicensees.LicenseeID = tblGroups.LicenseeID) INNER
JOIN tblScores ON tblGroups.GroupID = tblScores.GroupID) ON
tblSurveys.SurveyID = tblGroups.SurveyID WHERE
(((tblLicensees.LicenseeID)=" & strID & ") AND
((tblScores.GeneratedDate)>= '" & strFormattedStartDate & "') AND
((tblScores.GeneratedDate)