PatrickJohnson
Registered User.
- Local time
- Today, 04:01
- Joined
- Jan 26, 2007
- Messages
- 68
So, I have a report I send out monthly. The end user needs both the source data and a pivot table summary, and both must be in Excel. So my thought was to export the source query from Access to an Excel sheet, then use Access vba to build a pivot from the data. Then the problems began.
First off, let me say that there will be some solutions I know will be posted, so i want to rebut the ones that will not apply:
1) I cannot build an excel template pivot that uses the access database as it's source. The user(s) the report is for do not have network security access to the location the database resides in.
2) The pivot table in Access sucks. Up to the Pivot table creation point my code takes about 5 to 15 seconds. When using the pivot table view of the query, the query alone takes longer. And I can't get rid of the totals line under each entry.
3) I've already recorded a macro in Excel in an attempt to modify it for Access, but even though this seems to be a common practice for many, I can't find a single explanation on the object methods that says "If the excel vba command is x, in Access it would be y." I've tried some obvious substitutions, such as replacing "ActiveSheet" with my current worksheet variable, "ActiveWorkbook" with my current workbook variable, etc. But it gets all the way to the pivot creation, then throws the "Do you want to replace the content of cells..." error in excel referring to the source sheet???
So now that those are out of the way, how do you get access vba to build the table? I've tried everything I know.
First off, let me say that there will be some solutions I know will be posted, so i want to rebut the ones that will not apply:
1) I cannot build an excel template pivot that uses the access database as it's source. The user(s) the report is for do not have network security access to the location the database resides in.
2) The pivot table in Access sucks. Up to the Pivot table creation point my code takes about 5 to 15 seconds. When using the pivot table view of the query, the query alone takes longer. And I can't get rid of the totals line under each entry.
3) I've already recorded a macro in Excel in an attempt to modify it for Access, but even though this seems to be a common practice for many, I can't find a single explanation on the object methods that says "If the excel vba command is x, in Access it would be y." I've tried some obvious substitutions, such as replacing "ActiveSheet" with my current worksheet variable, "ActiveWorkbook" with my current workbook variable, etc. But it gets all the way to the pivot creation, then throws the "Do you want to replace the content of cells..." error in excel referring to the source sheet???
So now that those are out of the way, how do you get access vba to build the table? I've tried everything I know.