Struggling with charts

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.
 
T

Tara

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...
 
D

Duane Hookom

You should be able to modify the Row Source property of the chart to ensure
the proper sorting.
 
T

Tara

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??
 
D

Duane Hookom

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?
 
T

Tara

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];
 
D

Duane Hookom

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?
 

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