PivotTable: Type Mismatch

J

JAT

I am trying to use the PivotTable view in Access 2007 using VBA, but I keep
getting type mismatch errors. According to Microsofts guide in:
http://msdn.microsoft.com/en-us/library/aa139960(office.10).aspx

(for Access 2003 - but should be the same for 2007)

The code I should use is (as a sample):
Dim pTable As OWC11.PivotTable
' Set pTable = Me.PivotTable
Set pTable = Forms("frmPivotTable").PivotTable
pTable.BackColor = vbRed


I have a reference to the OWC11 DLL

The type mismatch error happens on the

Set pTable =

Line - either one causes the same error. Also there is no intellisense when
you access the PivotTable property of the Form. I use the OWC11 PivotTable
control directly on the form and I can write VBA to this without any problems.

Does anybody know of a solution?

Kind regards
Justin
 

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