
Originally Posted by
pbaldy
Since the email could be multiple schools, which school's would you want? Sounds like you want a totals query, but you haven't really given much detail.
My sql prints out as
Code:
SELECT tblSchools.NewSchoolsID, tblSchools.SchoolName, tblSchools.AreaID, tblSchools.SchoolEmail, tblSchools.[1ContactName], tblSchools.[1ContactSurname], tblSchools.Removed
FROM tblSchools
WHERE tblSchools.AreaID=112 AND tblSchools.Removed Is Null;
now some of these records show the same email - I'd like to define just one (I don't care which) however if I use distinct I won't be able to get fields like newschoolsid - lest I get all the rows.
doing
SELECT DISTINCT SchoolEmail
FROM tblSchools;
gives me distinct emails but nothing else
that's why I thought an array would work best, it would go through these records, putting in an email and then looping through the array to check if it is already added (and if not skip or rs.movenext since I am going through a recordset).