Solved

pivot chart title needs to read from form?

Posted on 2009-04-08
7
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

730 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