Struggling with charts

  • Thread starter Thread starter Tara
  • Start date Start date
T

Tara

I need to create a simple bar graph that shows the number of referrals for
various programs by month over the period of a specified year. I already
have a query that pulls the correct info, but when I try to create a graph
with it, I run into problems. Specifically, it only shows 6 of the 12
months. I need to have the number of referrals on the left (Y Axis) and the
months on the bottom (X Axis) with each program (of which there are 3)
represented by different colored bars. It all looks good except for the
missing months. Not sure why it's only showing 6 months instead of 12, but
I'm getting pretty frustrated, so any help would be greatly appreciated.
 
Sctatch that post...It IS showing each month, but it isn't LABELING each
month. Not only isn't it labeling each month, but the months it IS labeling
are sorted alpha instead of numerically. So, April is showing up as the left
most month, with August the 2nd (but not labeled), December as the 3rd, etc...
 
You should be able to modify the Row Source property of the chart to ensure
the proper sorting.
 
Thanks for responding Duane. I changed the report to reflect the proper sort
by using a different field from the query, unfortunately that field IS
numeric. So, then I tried adding the column from the query that shows month
in text form to the row source of the report as well, while still sorting on
the numeric month field. Now, I get an error message that says "You tried to
execute a query that does not include the specified expression
"ReferralMonth" as part of an aggregate function". I'm ready to pull my hair
out here!!! Any ideas??
 
I missed any mention of a report record source and possibly a link
master/child of your chart control. You also didn't provide the Row Source of
the chart.

How about providing more specifics?
 
Sorry Duane. I meant the row source for the chart, not the report. Here it
is as of now (when I'm getting the error message):

TRANSFORM Sum([CountOfProgram]) AS [SumOfCountOfProgram] SELECT
[ReferralMonth], [MoNum] FROM [tblReferralsYR] GROUP BY [MoNum] PIVOT
[Program];
 
I'm not sure of the data type of each of these fields considering this is
probably a table and you shouldn't need to store both the ReferrralMonth and
MoNum.

Try
TRANSFORM Sum([CountOfProgram]) AS [SumOfCountOfProgram]
SELECT [ReferralMonth], [MoNum]
FROM [tblReferralsYR]
GROUP BY [ReferralMonth], [MoNum]
ORDER BY MoNum
PIVOT [Program];

--
Duane Hookom
Microsoft Access MVP


Tara said:
Sorry Duane. I meant the row source for the chart, not the report. Here it
is as of now (when I'm getting the error message):

TRANSFORM Sum([CountOfProgram]) AS [SumOfCountOfProgram] SELECT
[ReferralMonth], [MoNum] FROM [tblReferralsYR] GROUP BY [MoNum] PIVOT
[Program];

Duane Hookom said:
I missed any mention of a report record source and possibly a link
master/child of your chart control. You also didn't provide the Row Source of
the chart.

How about providing more specifics?
 
Back
Top