J
Jay Simenson
The query below works. How can I change it to display only one record for
each businessname. I am getting multiple records with the UNION.
SELECT Members.MemberID, Members.TollFreePhone, Members.PhysZip,
Members.PhysState, Members.PhysCity, Members.PhysAddress, Members.Website,
Members.BusinessPhone, Members.BusinessName, Members.Category1,
Members.Inactive, Category.CatID, Category.Category, Category.Brochure
FROM Category INNER JOIN Members ON Category.CatID = Members.Category1
WHERE (((Members.Inactive)=0) AND
((Category.Brochure)=[Forms]![GuideSelect2]![Combo0]));
UNION
SELECT Members.MemberID, Members.TollFreePhone, Members.PhysZip,
Members.PhysState, Members.PhysCity, Members.PhysAddress, Members.Website,
Members.BusinessPhone, Members.BusinessName, Members.Category1,
Members.Inactive, Category.CatID, Category.Category, Category.Brochure
FROM Category INNER JOIN Members ON Category.CatID = Members.Category2
WHERE (((Members.Inactive)=0) AND
((Category.Brochure)=[Forms]![GuideSelect2]![Combo0]));
union
SELECT Members.MemberID, Members.TollFreePhone, Members.PhysZip,
Members.PhysState, Members.PhysCity, Members.PhysAddress, Members.Website,
Members.BusinessPhone, Members.BusinessName, Members.Category1,
Members.Inactive, Category.CatID, Category.Category, Category.Brochure
FROM Category INNER JOIN Members ON Category.CatID = Members.Category3
WHERE (((Members.Inactive)=0) AND
((Category.Brochure)=[Forms]![GuideSelect2]![Combo0]));
each businessname. I am getting multiple records with the UNION.
SELECT Members.MemberID, Members.TollFreePhone, Members.PhysZip,
Members.PhysState, Members.PhysCity, Members.PhysAddress, Members.Website,
Members.BusinessPhone, Members.BusinessName, Members.Category1,
Members.Inactive, Category.CatID, Category.Category, Category.Brochure
FROM Category INNER JOIN Members ON Category.CatID = Members.Category1
WHERE (((Members.Inactive)=0) AND
((Category.Brochure)=[Forms]![GuideSelect2]![Combo0]));
UNION
SELECT Members.MemberID, Members.TollFreePhone, Members.PhysZip,
Members.PhysState, Members.PhysCity, Members.PhysAddress, Members.Website,
Members.BusinessPhone, Members.BusinessName, Members.Category1,
Members.Inactive, Category.CatID, Category.Category, Category.Brochure
FROM Category INNER JOIN Members ON Category.CatID = Members.Category2
WHERE (((Members.Inactive)=0) AND
((Category.Brochure)=[Forms]![GuideSelect2]![Combo0]));
union
SELECT Members.MemberID, Members.TollFreePhone, Members.PhysZip,
Members.PhysState, Members.PhysCity, Members.PhysAddress, Members.Website,
Members.BusinessPhone, Members.BusinessName, Members.Category1,
Members.Inactive, Category.CatID, Category.Category, Category.Brochure
FROM Category INNER JOIN Members ON Category.CatID = Members.Category3
WHERE (((Members.Inactive)=0) AND
((Category.Brochure)=[Forms]![GuideSelect2]![Combo0]));