I am trying to send an email to participants who have Confirmed Booking. A Confirmed Booking is a Booking whereby the Participant has PAID and sent in the PL Documents. The email should only go to those people who have not been emailed already.
The trouble is, its emailing both people who have only Paid and not sent their PL Documents.
What am I missing
Code:
strSQL = "SELECT tblParticipants.PName, tblParticipants.PEmail, tblBookings.PLReceived, tblBookings.EventID, tblEvents.EventName," & _
"tblEvents.Location, tblEvents.EventDate, tblBookings.AmountPaid, tblBookings.EmailSent, tblBookings.EmailSentDate " & _
"FROM (tblBookings INNER JOIN tblEvents ON tblBookings.EventID = tblEvents.EventID) INNER JOIN " & _
"tblParticipants ON tblBookings.ParticipantID = tblParticipants.ParticipantID WHERE (((tblBookings.EventID)= " & [Forms]![frmbookingreport]![EventID] & ") " & _
"AND ((tblBookings.AmountPaid)is not null ) AND ((tblBookings.PLReceived)= Yes AND ((tblBookings.EmailSent)=0)));"
The trouble is, its emailing both people who have only Paid and not sent their PL Documents.
What am I missing