Results 1 to 4 of 4
  1. #1
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Pivot tables and Charts - Swapping (Access 2003)

    When I open a Pivot table I can easily swap between a table and a chart using the View Menu.
    However I don't seem to be able to put command buttons on the Form.

    I like to put a Close button on every form, so to achieve this I am putting the Pivot table/chart in a subform, within a conventional form .

    I can put the command button, and a form header on the outer form and all works OK.

    My question: Is there some way of retaining the ability of easily swapping between table and chart, preferably via command button on the main form.

    I can't find any code that will do it. There are:
    DoCmd.RunCommand acCmdPivotChartView
    DoCmd.RunCommand acCmdPivotTableView

    but they just produce an error, "The command is not available now" presumably because they want to act on the main form rather than the subform.

    Is there another way?
    Regards
    John



  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Pivot tables and Charts - Swapping (Access 200

    A further thought on this is that I could have two subforms, one with a pivot table, the other with a pivot chart, and just toggle the visibility of the two.
    I am sure this would work, but i am still interested in a better answer.
    Regards
    John



  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Pivot tables and Charts - Swapping (Access 2003)

    I have tried to do similar things but to no avail and have posted questions such as can you insert buttons on a pivot table report that will sort the data (no luck). When opening the Pivot Table, as you know, excel is controlling the process. Perhaps if you could create an excel form that could be called from access to open with these features already programmed, it might work. I have no idea how to do this. I will watch your thread as I am very interested in this as I use pivot tables quite often.
    Regards,

    Gary
    (It's been a while!)

  4. #4
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Pivot tables and Charts - Swapping (Access 200

    Thanks

    Another thought I had was to create a custom toolbar with such features, then automatically show it when the pivot table is opened. I will explore that at some stage.

    Toggling the visibility of two subforms works, but if you make any changes to the data selected in one view, the changes are lost when you change to the other.
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •