April15Hater
Accountant
- Local time
- Today, 16:45
- Joined
- Sep 12, 2008
- Messages
- 349
Hi guys
I'm hoping this is even possible. I have a crosstab query and I noticed the Column Headings and Values are always shown last. I have another field that I need to show after the values. How can I alter my code to do that?
Thanks,
Joe
I'm hoping this is even possible. I have a crosstab query and I noticed the Column Headings and Values are always shown last. I have another field that I need to show after the values. How can I alter my code to do that?
Thanks,
Joe
Code:
TRANSFORM Sum(tblProductionInputDetail.ProductionUnits) AS SumOfProductionUnits
SELECT tblProductionInput.ProductionID as PID, tblProductionTracking.TrackingNumber as Tracking, [ContractorLast] & " ," & Left([ContractorFirst],1) AS Contractor, tblProductionInput.CompleteDate, tblProductionInput.FinalizeDate
FROM tblClient INNER JOIN ((tblJob INNER JOIN tblFunction ON tblJob.JobID = tblFunction.JobID) INNER JOIN (tblFunctionTracking RIGHT JOIN (tblContractorFunction INNER JOIN (((tblProductionInput INNER JOIN tblContractor ON tblProductionInput.ContractorID = tblContractor.ContractorID) INNER JOIN tblProductionInputDetail ON tblProductionInput.ProductionID = tblProductionInputDetail.ProductionID) INNER JOIN tblProductionTracking ON tblProductionInput.ProductionID = tblProductionTracking.ProductionID) ON tblContractorFunction.ContractorFunctionID = tblProductionInputDetail.ContractorFunctionID) ON tblFunctionTracking.FunctionTrackingID = tblProductionTracking.FunctionTrackingID) ON (tblFunction.FunctionID = tb
lProductionInput.FunctionID) AND (tblFunction.FunctionID = tblContractorFunction.FunctionID)) ON tblClient.ClientID = tblJob.ClientID
WHERE (IsNull([ClosingDate]) = True) AND (tblClient.ClientID = 18 ) and (IsNull([Hierarchy]) = False) And (IsNull([Finalizedate]) = False) And (tblContractorFunction.FunctionType = "aerial" Or tblContractorFunction.FunctionType = "underground" Or tblContractorFunction.FunctionType = "unit") AND (TrackingOnly=False)
GROUP BY tblProductionInput.ProductionID, tblFunction.FunctionID, tblJob.JobID, tblClient.ClientID, tblProductionTracking.TrackingNumber, [ContractorLast] & " ," & Left([ContractorFirst],1), tblProductionInput.CompleteDate, tblProductionInput.FinalizeDate, IsNull([Hierarchy]), IsNull([ClosingDate]), IsNull([Finalizedate])
PIVOT tblContractorFunction.FunctionType;