We help IT Professionals succeed at work.
Get Started

Ordering the seriescollection in an Access PivotChart form

354 Views
Last Modified: 2016-02-10
I am using the chartspace object in my Access 2010 application.
It is not always easy to format the control via VBA, but up until this point I have managed.

The current issue I have is that my bar chart needs to display each series in a particular order
The chart displays along a time line in years, with a grouping for each year of 3 bars.

eg: low, base, high ....it current does it alphabetically :  base, high, low.

The recordset that populates the chart serves up the data in the right order, but when the chart displays the bars are sorted incorrectly.

eg: 2015 low   5.4
      2015 base 6
      2015 high  7.9
      2016 low   5
      2016 base 5.9
      2016 high  6.1

I need to use VBA to solve this issue, as the form presented to the user is readonly and doesnt allow direct changes to the chart. I dont know if this helps but the data is bound as

            .SetData chDimCategories, chDataBound, "YearNumber"
            .SetData chDimValues, chDataBound, "Rate"
            .SetData chDimSeriesNames, chDataBound, "RateTitle"  ' (low,base,high)
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE