Ok, I am stymied.
Have a table of inventory records.
Multiple columns, three of them contain criteria i want to select / exclude on.
1. Department
2. Class
3. Subclass
I want to select all records for department "04" but exclude records that are in Class "05" sub-class "02" in that dept.
In other words, the record:
Department "04"
Class "05"
SubClass "02" will be excluded
but..............
Dept. "04"
Class "05"
SubClass "01" will retrieve the record.
Every way I try to set up this query it will EXCLUDE all records in Class "05" or INCLUDE only Department "05"
([AllItemsConsolidatedTable1]![Class]<>"05" And [AllItemsConsolidatedTable1]![SubCls]="02"
Can someone help me with syntax that will allow me to group the Class and Subclass together as in if field1 contains "04" and field2 contains "05" and the field3 contains "02" to exclude but include all others?
SELECT AllItemsConsolidatedTable1.MAS90ITEMKEY, AllItemsConsolidatedTable1.Dept, AllItemsConsolidatedTable1.Class, AllItemsConsolidatedTable1.SubCls
FROM AllItemsConsolidatedTable1
WHERE (((AllItemsConsolidatedTable1.Dept)="04"
AND ((AllItemsConsolidatedTable1.Class)<>"05" And [AllItemsConsolidatedTable1]![SubCls]="02"
);
It's like the above is treating the Class and SubClass compare exclusively and i need it to compare them mutually. maybe what i am trying to do is not possible in a query.
thanks
paul
Have a table of inventory records.
Multiple columns, three of them contain criteria i want to select / exclude on.
1. Department
2. Class
3. Subclass
I want to select all records for department "04" but exclude records that are in Class "05" sub-class "02" in that dept.
In other words, the record:
Department "04"
Class "05"
SubClass "02" will be excluded
but..............
Dept. "04"
Class "05"
SubClass "01" will retrieve the record.
Every way I try to set up this query it will EXCLUDE all records in Class "05" or INCLUDE only Department "05"
([AllItemsConsolidatedTable1]![Class]<>"05" And [AllItemsConsolidatedTable1]![SubCls]="02"
Can someone help me with syntax that will allow me to group the Class and Subclass together as in if field1 contains "04" and field2 contains "05" and the field3 contains "02" to exclude but include all others?
SELECT AllItemsConsolidatedTable1.MAS90ITEMKEY, AllItemsConsolidatedTable1.Dept, AllItemsConsolidatedTable1.Class, AllItemsConsolidatedTable1.SubCls
FROM AllItemsConsolidatedTable1
WHERE (((AllItemsConsolidatedTable1.Dept)="04"
It's like the above is treating the Class and SubClass compare exclusively and i need it to compare them mutually. maybe what i am trying to do is not possible in a query.
thanks
paul