Programming PivotChart Form (1 Viewer)

ions

Access User
Local time
Today, 12:37
Joined
May 23, 2004
Messages
785
Hello Access Expert,

I have created a PivotChart Form.

In the Open Event of the form I would like to Select specific categories determined at runtime for each of the Drop Zones / Filter Combo Boxes.

So for example if one of the Filter Combo Boxes has a list of Provinces I want to be able to deselect some and select others using VBA before the PivotChart Opens.

For the other Filter Combo Boxes (i.e Year) I always want All Selected before the PivotChart opens.

Can you provide some VBA examples or point me to some websites that have VBA examples to do the above?

The examples I have seen on the web add data to the Chart. I have all the data in the underlying query. I just need to control the selections in the Filter Combo Boxes using VBA.

Thank you
 

ions

Access User
Local time
Today, 12:37
Joined
May 23, 2004
Messages
785
Has anyone been able to figure this out?

I am still looking for a solution.

Thanks.
 

JHB

Have been here a while
Local time
Today, 21:37
Joined
Jun 17, 2012
Messages
7,732
So for example if one of the Filter Combo Boxes has a list of Provinces I want to be able to deselect some and select others using VBA before the PivotChart Opens.
The only way I can image it can be done, is in the form's open event, to open another form (dialog view) where you select/deselect Provinces. But why not wait until the form is open and then do the selection?
 

ions

Access User
Local time
Today, 12:37
Joined
May 23, 2004
Messages
785
JHB,

The Selecting all items can be done once the Pivot Chart form is open.

The Selecting All Code can even reside in the form that opened the Pivot Chart form.

I am looking for something like this.

Code:
frm.ChartSpace.PivotFields("Waste Class").ShowAllItems = True
 

JHB

Have been here a while
Local time
Today, 21:37
Joined
Jun 17, 2012
Messages
7,732
I am looking for something like this.

Code:
frm.ChartSpace.PivotFields("Waste Class").ShowAllItems = True
Okay, I thought you where looking for the below, (namely a way in which you could select some items and omit others before the form is shown):
In the Open Event of the form I would like to Select specific categories determined at runtime for each of the Drop Zones / Filter Combo Boxes.

So for example if one of the Filter Combo Boxes has a list of Provinces I want to be able to deselect some and select others using VBA before the PivotChart Opens.
 

ions

Access User
Local time
Today, 12:37
Joined
May 23, 2004
Messages
785
Sorry for the confusion.

I have been able to figure out how to Filter the Selections by using the Where argument in the Docmd.

The only thing missing now is being to Select All once the Pivot Chart Form is open.

Thank you.
 

Users who are viewing this thread

Top Bottom