N
nd
Access 2k with the following setup:
Our facility produces a substance that is used to coat
parts we also produce.
TblProduction captures how the substance is made with
BatchID being the primary key in that table. TblParts
captures how the part was made and what BatchID was used
to coat the top(TopCoatID) and the underside(UnderCoatID)
of the part. 99% of the time a different batch is used for
the 2 coatings. I needed a query to give me the PartID,
the TopCoatID, UnderCoatID, and a couple of other relevant
fields for the top and undercoat batches. I actually
created 2 queries based on tblProduction and then joined
them as follows: SELECT tblParts.PartID,
tblParts.CreateDate, tblParts.Type, tblParts.TopCoatID,
qryTopCoat.CComposition AS TopCoatComposition,
tblParts.UnderCoatID, qryUnderCoat.CComposition AS
UnderCoatComposition
FROM (tblParts INNER JOIN qryTopCoat ON tblParts.TopCoatID
= qryTopCoat.BatchID) INNER JOIN qryUnderCoat ON
tblParts.UnderCoatID = qryUnderCoat.BatchID;
The data looks ok except that the field aliases aren't
working. How to fix? And/or is there a better solution.
Our facility produces a substance that is used to coat
parts we also produce.
TblProduction captures how the substance is made with
BatchID being the primary key in that table. TblParts
captures how the part was made and what BatchID was used
to coat the top(TopCoatID) and the underside(UnderCoatID)
of the part. 99% of the time a different batch is used for
the 2 coatings. I needed a query to give me the PartID,
the TopCoatID, UnderCoatID, and a couple of other relevant
fields for the top and undercoat batches. I actually
created 2 queries based on tblProduction and then joined
them as follows: SELECT tblParts.PartID,
tblParts.CreateDate, tblParts.Type, tblParts.TopCoatID,
qryTopCoat.CComposition AS TopCoatComposition,
tblParts.UnderCoatID, qryUnderCoat.CComposition AS
UnderCoatComposition
FROM (tblParts INNER JOIN qryTopCoat ON tblParts.TopCoatID
= qryTopCoat.BatchID) INNER JOIN qryUnderCoat ON
tblParts.UnderCoatID = qryUnderCoat.BatchID;
The data looks ok except that the field aliases aren't
working. How to fix? And/or is there a better solution.