Solved

pivot chart title needs to read from form?

Posted on 2009-04-08
7
240 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HasData 9 36
Adding icons to a custom, shortcut menu function 6 41
Track name AutoCorrect info 14 46
Error: Operation must use an updateable query 2 9
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now