PivotChart in form display issue

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

Guest

I have pivotchart that displays within a form that is based on query data
within a date range parameter.

I want to allow the database user to click on a command button on a main
report/chart page and open this query.

I used the command button wizard, and choose Open Form operation and linked
to the form where the pivotchart resides.

When you click the command button it only displays the form in a datasheet
view with one record. It does not display the pivotchart. I went in to the
form properties and set it to only show the pivotchart view and the default
is pivotchart view.

I am using Access 2003. Any suggestions?

thanks!
Ginger
 
In the code that was created by the command button wizard, find this
statement:

DoCmd.OpenForm stDocName, , , stLinkCriteria

And modify it to look like this:

DoCmd.OpenForm stDocName, , , stLinkCriteria, View:=acFormPivotChart
 
Baz, I modified the code as you suggested and got a "COMPILE ERROR: Named
Argument already specified."

So I changed the line to this: DoCmd.OpenForm stDocName, , , acFormPivotChart
It just opened the form same as before, without the PivotChart.

So I tried changing the line to this: DoCmd.OpenForm stDocName, , ,
View:=acFormPivotChart
And I got the same COMPILE ERROR.

Any other suggestions?
Thanks!
 
It's all them darned commas. Much better to name all of the arguments. Try
this:

DoCmd.OpenForm FormName:=stDocName, View:=acFormPivotChart,
WhereCondition:=stLinkCriteria
 
Baz - It worked!! Thanks so much! :) Ginger

Baz said:
It's all them darned commas. Much better to name all of the arguments. Try
this:

DoCmd.OpenForm FormName:=stDocName, View:=acFormPivotChart,
WhereCondition:=stLinkCriteria
 
Baz, I now have a form for dataentry that I want displayed in DATASHEET view
after the user clicks on the command button to open it.

I copied the code used for displaying the PivotChart in the form and changed
the argument: View:=acFormPivotChart to View:=acFormDataSheet

However, I still get the columnar view when the form opens. Did I not use
the correct term in my argument?

Thanks!
Ginger
 
It's acFormDS

GingerVA said:
Baz, I now have a form for dataentry that I want displayed in DATASHEET view
after the user clicks on the command button to open it.

I copied the code used for displaying the PivotChart in the form and changed
the argument: View:=acFormPivotChart to View:=acFormDataSheet

However, I still get the columnar view when the form opens. Did I not use
the correct term in my argument?

Thanks!
Ginger
 
Back
Top