Solved

pivot chart title needs to read from form?

Posted on 2009-04-08
7
249 Views
Last Modified: 2013-11-28
is there a way to make my form and/or report chart title read from a form?
im making a chart to see complete and open jobs by mechanic section and the chart is fine but i need to add a title.  and the title needs to be the vehicle being worked on.  which on my reports form i have a txtbox that has vehicles in it.  so can i get the chart title to read that txtbox?
0
Comment
Question by:sumhungl0
  • 4
  • 3
7 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 24097056
I think you would do...

me!ChartName.charttitle.text = me.!textboxname
0
 

Author Comment

by:sumhungl0
ID: 24097088
where do i put that?
gonna look to see if i can find the chart name also, i dont know the names, it was all drag and drop really.
0
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 500 total points
ID: 24097392
Well i don't think it works anyway- reading Help more closely it appears to say contradictory things - see my ****
I've tried to use it and can't get it to work.
_________________________
HELP Entry....
ChartTitle Property
See AlsoApplies ToExampleSpecificsReturns a ChartTitle object that represents the title of the specified chart. ***Read-only.****

Example
This example ***sets*** the text for the title of the chart.

With myChart
    .HasTitle = True
    .ChartTitle.Text = "First Quarter Sales"
End With
_______________________________________________      

I've also realised that you refer to Pivot Charts- so I don't think this will apply anyway.
But I'm not clear what you mean by 'drag and drop' here.
A PivotChart is a form in Access.  Are you using some non-Access control to do this?
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:sumhungl0
ID: 24097449
no its not non-access.  this is the first time ive messed with any type of chart stuff.  so i did the pivot chart in access, and it has me drag and drop fields to drop boxes on the pivot chart area.  so thats where i came to the fact that i need the title to change depending on which vehicle is being charted.
0
 

Author Comment

by:sumhungl0
ID: 24098177
its cool, i think i have to put in the title on the form above the chart area.  or on the report above the chart.
0
 

Author Closing Comment

by:sumhungl0
ID: 31568017
thanks anyway
0
 
LVL 77

Expert Comment

by:peter57r
ID: 24098333
Gee what a pain this is...

I'm using A2003.
This code sets the axis titles in a Pivot Chart in A2003.

Private Sub Form_Load()

Dim oChart As ChChart
Set oChart = Forms(Me.Name).ChartSpace.Charts(0)

oChart.Axes(0).HasTitle = True
oChart.Axes(0).Title.Caption = " Horiz Axis"
oChart.Axes(1).HasTitle = True
oChart.Axes(1).Title.Caption = "Vert Axis"

End Sub

BUT and a really big BUT....
The code does not work with the default PivotChart.  The default PivotChart is based on software called OfficeWebComponents (OWC).  WHen you create a pivotchart in A2003 you automatically get a reference to OWC11.  But the code doesn't work in OWC11- you have to use OWC10 (= OWC for OfficeXP).
This, apparently, IS installed with Office2003 but you can't see it except as an Additional Control on the controls toolbox. So you have to create a new blank form, then from the the Additional Controls add a Microsoft Chart 10 to the form.  This adds the required reference to the VBA code references.
You can then discard the form you were just creating.
You then need to go to Tools>references in the VBA window and make sure you only have OWC10 selected and not OWC11.  The code should then work.

Of course if you're using Office2002 then you don't need to go through all of this as you will have the correct OWC anyway.



0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question