chart title

G

Guest

I have created a great chart based on the following data:

Month Year Employee Log Percentage
----------- ------- ----------------- ------------------
JANUARY 2007 BUD D 93.45%
JANUARY 2007 PHIL P 89.32%
JANUARY 2007 TONY K 92.15%

(there are a total of 13 records for January 2007, but just showing you a
sample.)

I have already sorted out only the month and year whose data I want to see
on the chart, but I would "LIKE" to have the Month and Year appear in the
title of the chart. How can I accomplish this?


Please help and also keep it somewhat simple if possible. I unfortunately
do NOT understand the SQL language well enough to decipher.
 
F

fredg

I have created a great chart based on the following data:

Month Year Employee Log Percentage
----------- ------- ----------------- ------------------
JANUARY 2007 BUD D 93.45%
JANUARY 2007 PHIL P 89.32%
JANUARY 2007 TONY K 92.15%

(there are a total of 13 records for January 2007, but just showing you a
sample.)

I have already sorted out only the month and year whose data I want to see
on the chart, but I would "LIKE" to have the Month and Year appear in the
title of the chart. How can I accomplish this?

Please help and also keep it somewhat simple if possible. I unfortunately
do NOT understand the SQL language well enough to decipher.

You might try placing the following code in whatever report section's
Format event the chart is placed in.
Depending upon your set up it might be all you need do.

Me!OLEUnbound0.ChartTitle.Text = "Data charted for " & [Month] & " " &
[Year]
Me!OLEUnbound0.Requery


OLEUnbound0 is the name of the chart control. Change to whatever your
chart control name is.
See below on the use of Month or Year as field names***


If that doesn't help, you can adapt the following code.
Place it in the Format event of whichever report section the chart is
placed in.

Me!OLEUnbound0.ChartTitle.Text = Forms!ParamForm!City & " for Year " &
Forms!ParamForm!txtYear
Me!OLEUnbound0.Requery

The above chart uses a form - "ParamForm" - to select the area and
year as parameters.
Forms!ParamForm!City is the control on the form that is used to select
the city.
Forms!ParamForm!txtYear is the control used to select the year to be
charted.

Change to whatever parameters you are using.
The form must be open when the report is run.

*** Note: Month and Year are reserved words and should not be used as
field names.

For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html
 
G

Guest

Fred:
Sorry, but I just do not understand Access well enough. My Chart Title is
"LOG PERC CHART". Therefore, a couple of questions:

1. Where do I enter this text that you are suggesting? Do I create a Text
Box and then enter this? Or something else? (I am sorry I am not educated
enough in this.)
2. Could you please write out the text for me exactly how I shoud enter it?

Thanks for your patience.

fredg said:
I have created a great chart based on the following data:

Month Year Employee Log Percentage
----------- ------- ----------------- ------------------
JANUARY 2007 BUD D 93.45%
JANUARY 2007 PHIL P 89.32%
JANUARY 2007 TONY K 92.15%

(there are a total of 13 records for January 2007, but just showing you a
sample.)

I have already sorted out only the month and year whose data I want to see
on the chart, but I would "LIKE" to have the Month and Year appear in the
title of the chart. How can I accomplish this?

Please help and also keep it somewhat simple if possible. I unfortunately
do NOT understand the SQL language well enough to decipher.

You might try placing the following code in whatever report section's
Format event the chart is placed in.
Depending upon your set up it might be all you need do.

Me!OLEUnbound0.ChartTitle.Text = "Data charted for " & [Month] & " " &
[Year]
Me!OLEUnbound0.Requery


OLEUnbound0 is the name of the chart control. Change to whatever your
chart control name is.
See below on the use of Month or Year as field names***


If that doesn't help, you can adapt the following code.
Place it in the Format event of whichever report section the chart is
placed in.

Me!OLEUnbound0.ChartTitle.Text = Forms!ParamForm!City & " for Year " &
Forms!ParamForm!txtYear
Me!OLEUnbound0.Requery

The above chart uses a form - "ParamForm" - to select the area and
year as parameters.
Forms!ParamForm!City is the control on the form that is used to select
the city.
Forms!ParamForm!txtYear is the control used to select the year to be
charted.

Change to whatever parameters you are using.
The form must be open when the report is run.

*** Note: Month and Year are reserved words and should not be used as
field names.

For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html
 

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