I have this transform:
TRANSFORM Nz(Sum(IIf([CODE]="L",[TOTAL],[TOTAL])),0) AS SumOfTOTAL
SELECT UNION.JOB
FROM [UNION]
WHERE (((UNION.JOB) Not Like "**Other - Non RetailPosition* *" And (UNION.JOB) Not Like "Dec*"))
GROUP BY UNION.JOB
ORDER BY [UNION].[Months2] & '-' & [CODE]
PIVOT [UNION].[Months2] & '-' & [CODE];
And I want to create a report from it, and it looks fine (as a report) but when I try to total the rows, on the report as =SUM([txt1]+[txt2]) and then run the report, I always get the msg box "The Microsoft Jet database engine could not execute the SQL statement because it contains a field that has an invalid data type".
So I went back to the cross tab query and on the properties of the value field set it to general number - still no good! and I know the underlying data is numeric as the cross tab can sum it up perfectly - any suggestions?
Kind regards
tony
TRANSFORM Nz(Sum(IIf([CODE]="L",[TOTAL],[TOTAL])),0) AS SumOfTOTAL
SELECT UNION.JOB
FROM [UNION]
WHERE (((UNION.JOB) Not Like "**Other - Non RetailPosition* *" And (UNION.JOB) Not Like "Dec*"))
GROUP BY UNION.JOB
ORDER BY [UNION].[Months2] & '-' & [CODE]
PIVOT [UNION].[Months2] & '-' & [CODE];
And I want to create a report from it, and it looks fine (as a report) but when I try to total the rows, on the report as =SUM([txt1]+[txt2]) and then run the report, I always get the msg box "The Microsoft Jet database engine could not execute the SQL statement because it contains a field that has an invalid data type".
So I went back to the cross tab query and on the properties of the value field set it to general number - still no good! and I know the underlying data is numeric as the cross tab can sum it up perfectly - any suggestions?
Kind regards
tony
Comment