Dynamic title on a graph/chart?

I have an embedded graph/chart on a form (in the Propertis, it has Class = 
MsGraph.Chart.8).  I have parameterized my database everywhere except for 
the Chart Title.  Is there anyway to get under the covers and cause this to 
be populated dynamically?  e.g., if it were just the form I would put = 
fncName("Principle1").

In general, where can I go to learn about Charts/Graphs? 


0
Laurel
6/16/2007 3:23:18 AM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies
1084 Views

Similar Articles

[PageSpeed] 36

Could you give me a little bit of guidance about how to reference the chart 
title in code?  I write code for forms and in modules, but I don't know how 
to reference the guts of a chart.

"Dhonan" <Dhonan@discussions.microsoft.com> wrote in message 
news:21073B3D-18E5-445C-9EF8-B44E1FF5281F@microsoft.com...
> The only way I have been able to do something like this is to put the data 
> I
> want in the Chart Title in a temp table in Access and then put in VB (or
> other) code into the chart program to read the table and put it in the
> heading.
>
>
> "Laurel" wrote:
>
>> I have an embedded graph/chart on a form (in the Propertis, it has Class 
>> =
>> MsGraph.Chart.8).  I have parameterized my database everywhere except for
>> the Chart Title.  Is there anyway to get under the covers and cause this 
>> to
>> be populated dynamically?  e.g., if it were just the form I would put =
>> fncName("Principle1").
>>
>> In general, where can I go to learn about Charts/Graphs?
>>
>>
>> 


0
Laurel
6/17/2007 9:01:27 PM
I am not sure how MS Graph works.  When I did this in Excel, I set up an 
access table called Exchange with only 1 record in it with the fields I 
wanted to share.  Here is the code I added to the Excel spreadsheet that was 
set up to run as an event when a particular cell in the spreadsheet changed.  
When the data changed, excel will update the data fields in the Exchange 
table that is to be shared.  In Access then you can pick up the data you need 
from the table.  In your case, you would put the data you needed for the 
graph into the Exchange table, and just read it in MS Graph.  I am assuming 
you can run a VB script in MS Graph that will run when the graph is loaded.  
Here is my code:

Dim cnnConn As ADODB.Connection
Set cnnConn = New ADODB.Connection
Dim rst As ADODB.Recordset
With cnnConn
     .Provider = "Microsoft.JET.OLEDB.4.0;"
     .ConnectionString = "c:\path to data base\databasename.mdb
End With
cnnConn.Open
Set rst = cnnConn.Execute("select * from exchange where recordnumber=1")

Set temp1 = Range("BudgetTotalIncome")
Set temp2 = Range("BudgetTotalExpense")
Set rst = cnnConn.Execute("update exchange set" _
    & " BudgetTotalIncome='" & temp1 _
    & "', BudgetTotalExpense='" & temp2 _
    & "'where recordnumber=1")
Set cnnConn = Nothing
End Sub

Sorry I can't be more specific - I am not that familar with the programs you 
are using.  I just thought my experience with excel as an embedded Object 
might help.


"Laurel" wrote:

> Could you give me a little bit of guidance about how to reference the chart 
> title in code?  I write code for forms and in modules, but I don't know how 
> to reference the guts of a chart.
> 
> "Dhonan" <Dhonan@discussions.microsoft.com> wrote in message 
> news:21073B3D-18E5-445C-9EF8-B44E1FF5281F@microsoft.com...
> > The only way I have been able to do something like this is to put the data 
> > I
> > want in the Chart Title in a temp table in Access and then put in VB (or
> > other) code into the chart program to read the table and put it in the
> > heading.
> >
> >
> > "Laurel" wrote:
> >
> >> I have an embedded graph/chart on a form (in the Propertis, it has Class 
> >> =
> >> MsGraph.Chart.8).  I have parameterized my database everywhere except for
> >> the Chart Title.  Is there anyway to get under the covers and cause this 
> >> to
> >> be populated dynamically?  e.g., if it were just the form I would put =
> >> fncName("Principle1").
> >>
> >> In general, where can I go to learn about Charts/Graphs?
> >>
> >>
> >> 
> 
> 
> 
0
Utf
6/18/2007 1:51:00 AM
On Jun 15, 10:23 pm, "Laurel" <FakeM...@Hotmail.com> wrote:
> I have an embedded graph/chart on a form (in the Propertis, it has Class =
> MsGraph.Chart.8).  I have parameterized my database everywhere except for
> the Chart Title.  Is there anyway to get under the covers and cause this to
> be populated dynamically?  e.g., if it were just the form I would put =
> fncName("Principle1").
>
> In general, where can I go to learn about Charts/Graphs?

objGraph.ChartTitle.Caption = "New Chart Title"

http://support.microsoft.com/kb/186855
The database listed here is for Access 97, but it will get you started
down the right path

HTH,
Chris M.

0
mcescher
6/18/2007 3:14:36 PM
Reply:

Similar Artilces:

Excel 2007 Chart in VB6 Program
I have another thread in the VB group and was told to post to these two groups so sorryfor the multi-post. Ill post there again just in case folks want to follow the thread. So I've had a Visual Basic 6 app (as an EXE) that has worked great for the last 9 years or so. Up until Excel 2003 I have had to make minimial changes for it to work properly. The app has an OLE control which acts as a container for many different external sources .In this control I embed an Excel workbook and display a chart sheet. I can interact with the workbook through the normal means of Excel programming objects...

how do I recover charts within an excel workbook?
The workbook had many charts that were previously visible. Now, upon opening the file, the charts are no longer visible. How to I reactivate them to appear? thanks ...

If my GP Dynamics support CPA's new cheque standard
Hi; I am using GP Dynamics 8.0 in Canada, we have Payable Management module installed. How can I know if my current version support the CPA's new cheque standard? The CPA's new cheque standard will be launched in July 2007. -- Kane Kane, Support for the new cheque format has nothing to do with the Payables module. Rather, it is a function of modifications or changes to the report that produces your cheque. Lyle On Fri, 22 Sep 2006 10:06:01 -0700, Kane <Kane@discussions.microsoft.com> wrote: >Hi; > >I am using GP Dynamics 8.0 in Canada, we have Payable Managem...

Prob. when viewing my XL graph thru internet...
Hi. A problem which may or may not be due to Excel: I have some files, protected and with some sheets hidden, which I am using to show graphs and data on the internet. I want the viewer to be able to copy off the data (so they are saved as .xls files. The problem is, when I view the file in internet explorer, the chart sheet in which the file is opened will have a different size (the chart expands to fill the whole screen). The other chart sheets are fine. ??? Also, #1 the chart toolbar appears (don't want or need it) and #2 when I hit Back, a prompt to save appears (unwanted, ...

Problem with Asset Allocator pie charts
Everything "seems" to be working fine with Money 2005 Premium (after restarting the program multiple times). I'm having a problem with many of the pie charts. They do not show up at all. I upgraded from Money 2004. Any ideas? I'm running Windows XP Professional if that's of any help. Thanks, Patrick I've seen them going on a new file on Win XP Pro - do you get them on a new file, or do they not appear on both a new and old one? -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://support.microsoft.com/default.aspx?scid=fh;EN-GB;...

Draw line in a chart
I have the following problem. I have a chart (date on x axis) on which I draw a line. How can I obtain the ending points of the line in order to compare, mathematically, their positions to corresponding values of chart at the same date? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements I'm sure your post makes perfect sense to you and might to other readers, but I am los...

how to chart who was working when
Hi there, I'm looking for some help in producing a chart. My organization has hired about 100 folks since 1991, each on contracts of varying lengths of time. Some peoples' contracts have ended, and some have been renewed. I set up some worksheets inputting their names, start and end dates with the intent of producing a graph that will tell me exactly how many people were working for us at one time, based upon 6 month intervals. For example: John Doe 7/29/91 - 3/31/05 Jane Doe 6/21/94 - 2/20/96 Jake Doe 8/2/01 - 4/18/03 I would like a chart that can tell me how many people w...

Missing Title Bar
I don't know what I did. Now the title bar of my document is missing, and the document is in a fixed position below my toolbar. I cannot minimize or expand my document. Please help. Thanks in advance, you rock! Sounds to me like you maximized the spreadsheet. If this is the case look in the upper left corner of excel. You should see a Min, Norma and Max buttons for excel. Below these, you should see another set o Min, Normal and Max buttons which is for the spreadsheet. Click th middle one (normal) to return to the original way of viewing. -- Message posted from http://www.Exce...

Pivot Chart: Stop skipping Dates on X-Axis
I have a pivot chart which pulls 2 pieces of information from one table 1 and 1 from Table 2. All three entries are included for each day. Except somedays which may have only the one piece of data from Table 2 or none at all. How do I get the table to automatically fill in all the days whether they have information or not? =?Utf-8?B?UHJpbmNl?= <Prince@discussions.microsoft.com> wrote in news:A5EF53AB-6063-434F-BFC3-43259301751D@microsoft.com: > I have a pivot chart which pulls 2 pieces of information from one > table 1 and 1 from Table 2. All three entries are included for &...

data labels disappear from graph when i close the worksheet
I have added datalabels to a bar graph. But they go away when i close the worksheet despite having saved the changes. Could any one elt me know why this is happening? Thanks ...

email charts
I have an excel workbook file containing many department sales charts that recieve data from a group of central data entry spreadsheets. Each department chart resides on its own sheet. Is there a way to email individual chart sheets (or snapshots of the chart sheet) to the respective departments without sending the entire parent file to all recipients? Thanks, Mnaut You could export the chart as a gif file, then email that file to the department. The following code creates a gif file from the active chart: '============================ Sub ExportChartGIF() ActiveChart.Export Filenam...

see chart from pushing button
how would I see a chart from pushing a button on the spreedsheet ? ...

Pivot charts formatting
Hi, I want to change the formatting imposed by default in a pivot chart and I want that changed formatting to be retained permanently. For example, for my bar chart, for the different series I have selected colours / patterns but every time I refresh the pivot table / chart; excel falls back to its own colour coding. Any way to get around this? Many thanks in anticipation. Not directly. The only way to simulate this is to record a macro of the formatting changes that you make and then set it up to run whenever the PivotChart calculates. Assuming your pivot chart is on a seperate shee...

pie-charting non-numeric data
I would like to chart and graph responses to a survey that are non-numeric in nature, such as a bar graph for "yes" and no" responses to a question. Or in particular a pie chart that shows how many people picked option "P" vs. "K", "J" or "N". For the pie chart I have a column of data cells, each containing one of the four letters. In short, how do I accomplish charting and/or graphing non-numeric responses? So you have a column of Yes/No or P/K or J/N? Construct a pivot table of this range, and you can produce counts of each value...

Excel 2003: How to make transparent columns in Excel chart?
If you create a bar plot froma given dataset you can format the columns by right clicking and choosing the desired options. In the tab that opens there is a slider which is supposed tho set the level of transparency of the column (selceted area). But so far i couldn't find a way how to use this slider. I know that there is an alternative way to get transparent bars by creating a rectangular object formating it and the use copy -> paste. But i wonder what is the slider for if you can't use it? Does anybody know have an idea? Cheers, Thomas ...

Switching x-axis & y-axis on line chart
I am working with a large data spreadsheet with year, number and currency data. My problem is when I extract data to create a standard line chart, the chart is defaulting to a specific x-axis and y-axis format with data related to each axis. For visualization purposes, I would prefer to have the data that is currently presented on the x-axis to instead be presented on the y-axis. And likewise, I would like the y-axis data be presented in the x-axis. However, I have been unable to figure out how to do this and the MS Excel Help menu does not seem to address this. Can anyone help? If ...

Stack Bar Charts
I have yearly information that I would like to graph in a stacked bar chart. I have years 2005 to present Two companies I am comparing with two variables for each company each year. I would like to have the stack bar chart by year reflect the stack of Co A vs Co B on variable 1 + 2. Any help would be appreciated. Thanks. You want a clustered-stacked chart: http://peltiertech.com/WordPress/clustered-stacked-column-charts/ http://peltiertech.com/WordPress/clustered-stacked-bar-charts/ - Jon ------- Jon Peltier Peltier Technical Services, Inc. http://peltiertech.com/ Sean wrote: > ...

personal income and expenditure chart
can anybody give me a personal income and expediture chart please Thanks Mike mikeyboy87 wrote: > can anybody give me a personal income and expediture chart please > Thanks Mike You can do this in Excel but why re-invent the wheel? Quicken or Money have far more tools and options. If money is an issue try checking ebay. I purchased Quicken 2004 for about $10 including shipping. It isn't the latest and greatest but it does what I need it to do. gls858 ...

Chart drilldown to data
I have a client that has MS Excel 2000 bar charts made from worksheet data series. He wants to be able to click on a chart object such as a bar and have the source data come to the front. I have tried to put buttons over the chart but I can't change the button color to match the chart. I can change the chart bar to be the gray color of the button but that is not desirable. Is their a way to send the button to the back behind the chart and still get the button to respond to a click? Is there any way to turn a worksheet cell into a button? The only way I can see is to place a button ov...

Charting challenge/query
The following quote is posted on behalf of a client using Windows and Office 2003 Standard. Please email responses directly to me, too, since I do not read this group much. Any help/insight would be most appreciated. I'll do my best to relay any questions people have and bring back any answers to said questions. <quote> The Goal: In an effort to come up with a new way of looking at organizational structure, I employed Excel's 'Donut Chart' function. My goal was to have the head of the organization in the middle of the chart and then that person's direct re...

How to "freeze" chart & separate it from it's Data
I would like to produce a chart and then rearrange the data to produce a separate chart. Is there a way of separating a chart from it's data so that I can take the data and after rearrangement, produce another chart? Hi, Here is some information on how to de-link chart and data. http://peltiertech.com/Excel/ChartsHowTo/DelinkChartData.html Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Rooky228" <Rooky228@discussions.microsoft.com> wrote in message news:4B519787-DF2D-4C1C-B941-DBC1FD054184@microsoft.com... >I would like to produce a c...

graph #2
im making a report and i want to insert this data in the chart but only top 3 highest value in jan feb mar and apr will see in the graph. how can i do that? jan feb mar apr A 23 3 5 5 B 1 3 1 5 C 4 1 0 34 D 16 2 2 2 E 3 14 4 1 F 4 5 3 0 jaypee wrote: > im making a report and i want to insert this data in the chart but only top > 3 highest value in jan feb mar and apr will see in the graph. > how can i do that? > > jan feb mar apr > A 23 3 5 5 >...

Graph Charts
I am creating a chart and I would like increments on the axis as follows: 0 25 50 75 100 200 300 400 500 Is this possible? Yes, if you make a Line chart rather than an XY chart Do not put a label over the x-values - this will make it easier to get the Line chart Best wishes -- Bernard Liengme www.stfx.ca/people/bliengme remove CAPS in e-mail address "Taylor" <anonymous@discussions.microsoft.com> wrote in message news:111a01c42633$6893c9c0$a101280a@phx.gbl... > I am creating a chart and I would like increments on the > axis as follows: > > 0 25 50 75 100 200 ...

How to keep data fields an graphs together when sharing presentati
When I create a graphic chart in PowerPoint and then send it for comments to other parties thru e-mail, they can't edit the data fields. PowerPoint gives the error that can't find the data. How can I keep the worksheets attached presentation slides? And... how can I fix the problem on slides already made? In article <D13996A0-BF28-4E70-8A4A-BEB9E06F0F02@microsoft.com>, Margie wrote: > When I create a graphic chart in PowerPoint and then send it for comments to > other parties thru e-mail, they can't edit the data fields. PowerPoint gives > the error t...

Rule to auto reply using a dynamic text file as attachment or message body
Using the rules wizard in Outlook 2003, I have been able to create a rule that automatically replies to a sender that has specific words in the subject using "have the server reply using a specific message" or "reply using a specific template". My problem is this: I have a text file located on my local hard drive that is updated by an excel spreadsheet every 15 minutes. When someone sends me an email with specific words in the subject, I want to reply with the text file either as an attachment or inline message (perferred). The issue I am having is that the message speci...