I'm sure this has been done before, but I can't find it in a post.
I need to modify this query
Code:
SELECT LabInventory.Lab, LabInventory.Type, LabInventory.Drawer, LabInventory.ItemDescription, LabInventory.Label, LabInventory.LabelDetail
FROM Category INNER JOIN LabInventory ON Category.[Category] = LabInventory.[Label]
WHERE (((Category.Size)=Yes));
I want to return every record in my table with a repeated Lab and Label field combination (i.e Lab 1, Label Beakers) that is the same for each record, only if the Type and Drawer fields are not the same in every occurrence of that combination. For instance:
[ID] [Lab] [Type] [Drawer] [Label] [ItemDescription]
1---- 1----- A------- 1------ Beakers---10mL
2---- 1----- A------- 1------ Beakers--- 50mL
3---- 1 -----B------- 1------ Beakers--- 100mL
4---- 2----- A------- 1------ Beakers--- 50mL
5---- 2----- A------- 2------ Flasks----- 25mL
6---- 2----- A------- 2------ Flasks----- 10mL
So the first three records would be returned, but since the 4th only occurs one time, it's not returned and the fifth and sixth are not returned because every instance of those field in question match.
I hope this post makes since.
Thank You.