I have a combo box that adds the owners of something to a list in a subform. What I would like to do is limit the list in the combo box so that when The box is opened, those owners on the subform already are not in the combo.
This is the code that I have for the combo box dataset. It lists all of the owners.
SELECT DISTINCT qryNames.EntityID, qryNames.Name
FROM qryNames LEFT JOIN [qryOverall-sfrmOwner] ON_
qryNames.EntityID = [qryOverall-sfrmOwner].OwnerID
Or ([qryOverall-sfrmOwner].SubFundID) Is Null))
ORDER BY qryNames.Name;
Thanks in advance!!
p.s. I know that I need to change the name "Name" for one of the fields. That is on the list!
Use: SELECT ... FROM ... WHERE ... NOT IN (SELECT ...
Example (from the book):
SELECT FirstName, LastName
FROM Person.Contact AS c
JOIN HumanResources.Employee AS e
ON e.ContactID = c.ContactID
WHERE EmployeeID NOT IN
WHERE SalesQuota > 250000)