Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 26th, 2004, 11:22 AM
Authorized User
 
Join Date: Jul 2003
Location: Stockton on Tees, , United Kingdom.
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default PivotTable programming

I have created a simple pivot table with a Date field as a column.

In the following code segment shown below, the lines:-

    Set fset1 = .FieldSets("LabReceivedDate By Mon")
    .ColumnAxis.InsertFieldSet fset1

work, but they insert all the child date fields Years, Quarters, Months etc.
I only want to insert and display the Years and Months. -

Can any one help with the syntax?


Code segment start:

DoCmd.OpenForm strFormName, acFormPivotTable
Set frm1 = Forms(strFormName)

With frm1.PivotTable.ActiveView
    'Assign fieldset members to the column, row, and detail sections of
    'the PivotTable
    Set fset1 = .FieldSets("ClientCode")
    .FilterAxis.InsertFieldSet fset1

    Set fset1 = .FieldSets("LabReceivedDate By Mon")
    .ColumnAxis.InsertFieldSet fset1

    Set fset1 = .FieldSets("Vessel")
    .RowAxis.InsertFieldSet fset1
    Set fset1 = .FieldSets("LabRef")
    .DataAxis.InsertFieldSet fset1

End With
'Close form with its PivotTable view
DoCmd.Close acForm, strFormName, acSaveYes
Code segment end:



Cheers Ray
__________________
Cheers Ray
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
relationship in PivotTable with diferents tables juliano_sb Visual Studio 2005 0 July 17th, 2008 09:44 AM
pivottable form Vince_421 Access VBA 2 May 26th, 2006 07:52 AM
PivotTable-access rigths for columns harmony82 Access VBA 0 July 19th, 2005 04:28 PM
excel 97 & pivottable pilmart Excel VBA 1 November 18th, 2003 08:44 AM
PivotTable Column won't go Invisible Stoney Excel VBA 0 November 5th, 2003 07:22 PM



All times are GMT -4. The time now is 05:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.