i have my query set up with calculated fields like so:
what i'm trying to do now is calculate the net production by subtracting the two calculated fields [Gross Production - LBS] - [Scrap Produced - LBS] AS [Net Production] and i need to Sum the date range i input because the final data must display a full month or a quarterly summary. not sure where to go from here.
Code:
PARAMETERS [First Date] DateTime, [Second Date] DateTime, [Shift] Text ( 255 );
SELECT Main.[Mth/day], Main.Shift, [Run Hrs]*[Actual Lbs/hr] AS [Gross Production - LBS], [Scrap Lbs 1]+[Scrap Lbs 2]+[Scrap Lbs 3] AS [Scrap Produced - LBS],
FROM Main
WHERE (((Main.[Mth/day]) Between [First Date] And [Second Date] And [Shift]=[Main].[Shift]));
what i'm trying to do now is calculate the net production by subtracting the two calculated fields [Gross Production - LBS] - [Scrap Produced - LBS] AS [Net Production] and i need to Sum the date range i input because the final data must display a full month or a quarterly summary. not sure where to go from here.