Gasman
Enthusiastic Amateur
- Local time
- Today, 20:21
- Joined
- Sep 21, 2011
- Messages
- 16,763
OK, this works
so try this, adjust for any of my errors 
HTH
Code:
Select * from tblClient WHERE tblClient.ClientCMS IN (SELECT DISTINCT Emails.CMS
FROM Emails
GROUP BY Emails.CMS
HAVING (((Count(Emails.CMS))>0)))

Code:
strSQL = "SELECT * FROM qryContacts "
StrWhere = "WHERE Contacts.ContactsID "
strCriteria = "(Select DISTINCT tbSales.ContactID from tblSales GROUP BY tblSales.ContactID HAVING (Count(tblSales.ContactID))>0)"
Select Case Me.optSales
Case 1 'Default--All Contacts
strWhere = ""
strCriteria = ""
Case 2 'Contacts with no sales
strWhere = strWhere & " NOT IN "
Case 3 'Contacts with Sales
strWhere = strWhere & " IN "
End Select
strSql = strSQL & strWhere & strCriteria
Debug.Print strSQL
Me!subfrmList.Form.RecordSource = strSql
HTH