You are here:

Using MS Access/Switchboard opens pivot table in form view


KenW wrote at 2006-06-23 15:03:41
Believe the change to the Case statement should be:

Case conCmdOpenFormPivot


Case conCmdOpenFormBrowse

otherwise, works fine.

law wrote at 2007-09-06 20:59:29
I had to make this constant a 10 because there was already a 9.

Also, I needed to take out the "t" from "rst!" so it changed from

DoCmd.OpenForm rst![Argument], acFormPivotTable


DoCmd.OpenForm rs![Argument], acFormPivotTable

Then I noticed that I actually wanted to view the Pivot Chart, not the table so I changed it one last time to

DoCmd.OpenForm rs![Argument], acFormPivotChart

Thank you so much for this answer!

AUM wrote at 2007-11-15 21:33:09
Perfect answer.


max wrote at 2008-01-19 18:31:31
The second code should be:

' Open a PivotTable.

Case conCmdOpenFormPivot

DoCmd.OpenForm rst![Argument], acFormPivotTable

Miles of Smiles wrote at 2009-04-02 05:34:20
Nice work Scott.

Two minor changes required

1: Typing error, You declare

Const conCmdOpenFormPivot = 9

but in the select satement is

' Open a PivotTable.

Case conCmdOpenFormBrowse

That should be

Case conCmdOpenFormPivot

2: Open the Switchboard in design view and copy the button and label to ensure that you have enough.  Ensure that you name the objects consistantly

darren wrote at 2011-01-04 21:04:50
A quick note.    You have conCmdOpenFormBrowse.  The 'Browse' should be 'Pivot' to match your first command line.  Also the DoCmd.OpenForm rst![Argument] should be DoCmd.OpenForm rs![Argument]

Rahul wrote at 2012-12-12 21:30:03
But Scott,

I am not able to find any thing in the left hand side objects, except for one form that i have

I cannt see the switch board form ( Form_Switchboard)

Using MS Access

All Answers

Answers by Expert:

Ask Experts




I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.


I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Brooklyn College BA

©2017 All rights reserved.