Pivot table opens in form view

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

You might have seen this msg from Ben but no one replied yet. I have the
exact same problem. Can anyone help with this? Thank you as always.

Hi,
I have a pivot table which displays some handy statistics on my database. I
have linked this table to a button on a form which opens the pivot table.
The trouble is when I click the button the form opens in form view and not
pivot table view. I have set it's properties to have the tables default view
as PivotTable and I have prevented the form from opening in any other view
with the 'allow design view' properties. This works when I open the form
individually but when it is linked to a button it opens in form view which
doesnt help at all. Is there any other properties or code that I could use?
Thanks for your help.
 
The OpenForm method allows you to specify a form view. Change

DoCmd.OpenForm "MyForm"

to

DoCmd.OpenForm "MyForm", acFormDS
 
Thank you so much Doug

Douglas J Steele said:
The OpenForm method allows you to specify a form view. Change

DoCmd.OpenForm "MyForm"

to

DoCmd.OpenForm "MyForm", acFormDS
 
Back
Top