RogerCooper
Registered User.
- Local time
- Today, 00:05
- Joined
- Jul 30, 2014
- Messages
- 544
A customer wants me to e-mail a spreadsheet showing sales and columns for each month (even future months). Here is a simplified version of the query.
The recordset appears on the screen correctly. When I export it as a spreadsheet, only the header row appears, all other rows are blank.
If I don't specify the column headings it shows the numbers correctly, but it does not show columns for future months as the customer has requested.
Is this a bug in Access?
I probably could work around this issue by creating a table and then exporting the table, but I am looking for a better solution
Code:
TRANSFORM Sum(dbo_History.Net_Sales) AS SumOfNet_Sales
SELECT dbo_History.CUSTOMER_NAME AS [Customer Name]
FROM dbo_History
WHERE (((dbo_History.BUYING_GROUP)="ITEG") AND ((dbo_History.YEAR)=Year(Date())))
GROUP BY dbo_History.CUSTOMER_NAME
ORDER BY dbo_History.CUSTOMER_NAME, dbo_History.Month
PIVOT dbo_History.Month In (1,2,3,4,5,6,7,8,9,10,11,12);
The recordset appears on the screen correctly. When I export it as a spreadsheet, only the header row appears, all other rows are blank.
If I don't specify the column headings it shows the numbers correctly, but it does not show columns for future months as the customer has requested.
Is this a bug in Access?
I probably could work around this issue by creating a table and then exporting the table, but I am looking for a better solution