PivotChart Form by manipulating PivotTable, ChartSpace & RecordSou

E

endernaught

Hello,

I am having trouble getting dynamically setup data to display on an Access
2002 Form that is shown in PivotChart mode. (OWC 10, VBA)

Here are the steps I have taken thus far:
1. I create a Form and set its RecordSource to a dynamically generated SQL
source string. As far as I understand, the PivotChart's DataSource should use
this query's results.
2. I open the Form in PivotChart mode, where I then proceed to modify the
form's PivotTable. I add various PivotFields to PivotAxes, and create
whatever calculated or total fields I need, also adding them to the
PivotTable's DataAxis.

I can see that these fields are added to the PivotChart's and PivotTable's
dropzones, and that the field list of the PivotChart is populated with fields
from the query string, however, no chart is generated in the PivotCharts
plotting space. I think I may need to use the SetData method of the
ChartSpace, but I am unsure how to use it with the way I setup the Forms
RecordSource.

Thank you,
Brad
 
E

endernaught

I have found the reason as to why charting data was not displaying in the
chart.

When opening the Access form in PivotChart mode, the form's
AcFormOpenDataMode must be set to acFormEdit.

Manipulating the Form's PivotTable through code then results in a PivotChart
that automatically updates, just as it would when manipulating it manually.
There is no need to use SetData of the chartspace as I speculated below.

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top