PivotChart in form display issue

G

GingerVA

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
 
B

Baz

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
 
G

GingerVA

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!
 
B

Baz

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

DoCmd.OpenForm FormName:=stDocName, View:=acFormPivotChart,
WhereCondition:=stLinkCriteria
 
G

GingerVA

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
 
G

GingerVA

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
 
B

Baz

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
 

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