Pivot Table Question

G

Guest

I have a database which I downloaded that has an example of progrramming pivot tables by Rick Dobson in a Pinnacle Publication called Smart Access. It works great when I open it in Access 2000 or above. If I import tables into this this database and adjust the record source to the new table and add new values to the pivot field sets I have no problem. If I try to export the pivot form to a Access 2000 or 2003 database and adjust the values as I did before I get the following error "Compile error: User defined type not defined" at this code leve

Sub ConfigureOrdersPivotTable(
Dim fst1 As PivotFieldSe

'Open form in PivotTable view and se
'a reference to the for
DoCmd.OpenForm strFormName, acFormPivotTabl
Set frm1 = Forms.Item(strFormName

'Set PivotTable fieldset
With frm1.PivotTable.ActiveVie
Set fst1 = .FieldSets("Stratum"
.RowAxis.InsertFieldSet fst
Set fst1 = .FieldSets("Depth"
.DataAxis.InsertFieldSet fst
End Wit

'Close form with its PivotTable vie
DoCmd.Close acForm, frm1.Name, acSaveYe

End Su

Any help regarding why I can't get this to work would be GREATLY appreciated
Thanks Paul
 
G

Guest

----- pas926 wrote: ----

I have a database which I downloaded that has an example of progrramming pivot tables by Rick Dobson in a Pinnacle Publication called Smart Access. It works great when I open it in Access 2000 or above. If I import tables into this this database and adjust the record source to the new table and add new values to the pivot field sets I have no problem. If I try to export the pivot form to a Access 2000 or 2003 database and adjust the values as I did before I get the following error "Compile error: User defined type not defined" at this code leve

Sub ConfigureOrdersPivotTable(
Dim fst1 As PivotFieldSe

'Open form in PivotTable view and se
'a reference to the for
DoCmd.OpenForm strFormName, acFormPivotTabl
Set frm1 = Forms.Item(strFormName

'Set PivotTable fieldset
With frm1.PivotTable.ActiveVie
Set fst1 = .FieldSets("Stratum"
.RowAxis.InsertFieldSet fst
Set fst1 = .FieldSets("Depth"
.DataAxis.InsertFieldSet fst
End Wit

'Close form with its PivotTable vie
DoCmd.Close acForm, frm1.Name, acSaveYe

End Su

Any help regarding why I can't get this to work would be GREATLY appreciated
Thanks Pau

Hi Paul, this error message suggests that an object library used in your example database is not included in the database references of the import database

I suggest that in the example database you open a module in design view. Then use Tools >>References to view the list of libraries. Check you import database against this list

Luc
Jonathan
 

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

Similar Threads

Pivot table default view 1
Pivot table opens in form view 2
Pivot Table Update 1

Top