I have a query that pulls all properties by a single owner. EX.
Name Account# Exemption
John Smith 123456 H
John Smith 654321
Jane Doe 234561
Jane Doe 165432
If an owner has one account with an "H" exemption, I want to pull all accounts for that person. If a person does not have an "H" exemption, I don't want to pull any accounts. So in the above example I want all accounts for John Smith since he has an exemption, but none for Jane Doe.
Here's my SQL:
SELECT qryAllTargetLetters.EI2PRCLID, qryAllTargetLetters.NAMELF, qryAllTargetLetters.COMPOFCR, qryAllTargetLetters.ALTYP, qryAllTargetLetters.TaxDue, qryAllTargetLetters.EI2CASNUM, qryAllTargetLetters.SUMOFEI2ACTFEE, qryAllTargetLetters.TotalDue, qryAllTargetLetters.TXEXMCOD
FROM qryAllTargetLetters INNER JOIN qryMultiOwners ON qryAllTargetLetters.NAMELF = qryMultiOwners.NAMELF;
(EI2PRCLID is the account number in the above example, TXEXMCOD is the exemption)
Any ideas?
Name Account# Exemption
John Smith 123456 H
John Smith 654321
Jane Doe 234561
Jane Doe 165432
If an owner has one account with an "H" exemption, I want to pull all accounts for that person. If a person does not have an "H" exemption, I don't want to pull any accounts. So in the above example I want all accounts for John Smith since he has an exemption, but none for Jane Doe.
Here's my SQL:
SELECT qryAllTargetLetters.EI2PRCLID, qryAllTargetLetters.NAMELF, qryAllTargetLetters.COMPOFCR, qryAllTargetLetters.ALTYP, qryAllTargetLetters.TaxDue, qryAllTargetLetters.EI2CASNUM, qryAllTargetLetters.SUMOFEI2ACTFEE, qryAllTargetLetters.TotalDue, qryAllTargetLetters.TXEXMCOD
FROM qryAllTargetLetters INNER JOIN qryMultiOwners ON qryAllTargetLetters.NAMELF = qryMultiOwners.NAMELF;
(EI2PRCLID is the account number in the above example, TXEXMCOD is the exemption)
Any ideas?