Hi,
I'm trying to set the fields on a pivotchart view embedded on a tab form, but I just can't get the code right.
Form Name : [Input_Form]
Tab Name: [Reports]
Chart Name: [PivotChart]
Any help will be appreciated.
Denis :banghead:
Sub Test()
Dim fset1, fset2, fset3 As Object
DoCmd.OpenForm ("Input_Form"), acNormal
With Forms![Input_Form].[PivotChart].PivotTable.activeview
Set fset1 = .FieldSets("PA_Groupings")
Set fset2 = .FieldSets("OrderID")
Set fset3 = .FieldSets("Amt")
.RowAxis.InsertFieldSet fset1
.ColumnAxis.InsertFieldSet fset2
.DataAxis.InsertFieldSet fset3
End With
I'm trying to set the fields on a pivotchart view embedded on a tab form, but I just can't get the code right.
Form Name : [Input_Form]
Tab Name: [Reports]
Chart Name: [PivotChart]
Any help will be appreciated.
Denis :banghead:
Sub Test()
Dim fset1, fset2, fset3 As Object
DoCmd.OpenForm ("Input_Form"), acNormal
With Forms![Input_Form].[PivotChart].PivotTable.activeview
Set fset1 = .FieldSets("PA_Groupings")
Set fset2 = .FieldSets("OrderID")
Set fset3 = .FieldSets("Amt")
.RowAxis.InsertFieldSet fset1
.ColumnAxis.InsertFieldSet fset2
.DataAxis.InsertFieldSet fset3
End With