Changing chart labels in an Access report

G

Guest

I have created a chart on a report in Access using the following SELECT
statement.

SELECT (Format([DateMatterServed],"Q 'YY")),Count(*) AS [Count] FROM
[qryAdminChargeChart] GROUP BY (Year([DateMatterServed])*4 + DatePart("q",
[DateMatterServed])-1),(Format([DateMatterServed],"Q 'YY"));

Any ideas on how I can add a "Q" in front of the X axis labels on the chart
so the quarter labels on the X axis will display as "Q1 '04" instead of "1
'04" which Access generates as the label.

I am using Access 2000.

Thanks in advance for your help.
Marie
 
S

SA

Marie:

Yes, you could do this, however it would require a lot of VBA code at run
time. There's no "prefix" option for labels in the Chart/Graph control as
you've found. It might be easier to simply add a lable to the axis called
"Quarters"

If you really want to do this at run time, then you have to address the
chart object in code

Dim objChart as object
Set objChart = Me!NameOfYourChartControl

and then use VBA (see the charge help file -> Programming information) to
address chart elements.

HTH
 

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