|
-
Dec 15th, 2005, 08:27 PM
#1
Thread Starter
Junior Member
Access Pivottable
Hi,
I have built a pivot table using VBA, and some of the codes are listed below,
With frm1.PivotTable.ActiveView
.RowAxis.InsertFieldSet .FieldSets("Client name")
.RowAxis.InsertFieldSet .FieldSets("Orders")
(I have problem when a second rowaxis is inserted)
.ColumnAxis.InsertFieldSet .FieldSets("Money")
.DataAxis.InsertFieldSet .FieldSets("Price")
.AddTotal "Total Money", .FieldSets("price").Fields("price"), plFunctionSum
.DataAxis.InsertTotal .Totals("Total Money")
End With
Screen.ActiveDatasheet.PivotTable. _
ActiveData.HideDetails
(This is to show the summarised version)
what i get is, The dataaxis field is summarised, but the FIRST RowAxis(Client Name) is in "expand" mode. i have to manually click on the "Collapse" button on the tool bar in order to see the overall summarized version.
how to "Collapse" the "Client Name" fieldsets using VBA?
thanks in aniticipation.
-
Dec 16th, 2005, 03:17 AM
#2
Re: Access Pivottable
Record a macro doing the action you desire. Then stop and check out the module code generated by Excel to give you an insight in how its done.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 16th, 2005, 04:02 AM
#3
Thread Starter
Junior Member
Re: Access Pivottable
HI, thanks for the reply,
i know there is a record macro in EXCEL.
but i am doing it in Access. and there is no record macro.
besides, the codes generated by excel for this action does not work for ACCESS.
so may i know if any of you have the code for this action.
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|