Can someone help me with my syntax here. I am trying to send an email to people if they have at least one student in the faculty specified by an inputbox. This works but it sends as many emails as there are students in that faculty i.e: if someone has 2 students in a faculty they get 2 emails when i only want them to get 1. Here's my code:
Set rs = db.OpenRecordset("Select [tblTutor].[TU_EMAIL]from [tblTutor]inner join [tblStudents] on [tblTutor].TU_CODE = [tblStudents].STU_TU_CODE where [tblStudents].[STU_FAC_NO] = " & "'" & fac & "';")
Set rs = db.OpenRecordset("Select [tblTutor].[TU_EMAIL]from [tblTutor]inner join [tblStudents] on [tblTutor].TU_CODE = [tblStudents].STU_TU_CODE where [tblStudents].[STU_FAC_NO] = " & "'" & fac & "';")