Stacked column chart on Access form

aman

Registered User.
Local time
Yesterday, 22:28
Joined
Oct 16, 2008
Messages
1,251
Hi Guys

I want to display a Stacked column chart on a Form. The X axis should display all the managers names and Y axis will display "Number of reasons" and stacked bars will display "Name of the reasons for not signing the forms".

Please see attached the example of the graph I want on my form.

The query for the graph is as below:
Code:
SELECT qry_RMS_UnionReasons.[Staff Name], qry_RMS_UnionReasons.[1stRefuseReason], Sum(qry_RMS_UnionReasons.Times) AS SumOfTimes
FROM qry_RMS_UnionReasons
GROUP BY qry_RMS_UnionReasons.[Staff Name], qry_RMS_UnionReasons.[1stRefuseReason];

But when I tried to create a graph on my form then it just shows line managers name on the X axis and numbers of reasons on Y axis but it doesn't show reasons names and bar stacks.

Can anyone please provide me the guidance on creating stacked column chart on access forms?

Very much appreciated .

Thanks
 

Attachments

Open report in design View
dbl-Click on the chart itself to edit chart
select a column
right-click on column
Click on Chart Type
Choose your the stack column (either values or Percents)

(microsoft coulda made it easier)
 
I have used chart control on the form and written the following query. It shows separate bars on the charts for each reason type. I tried to overlap by setting it to 100% but one set of data which is larger than another hiding the smaller set. Any ideas ?
Code:
TRANSFORM Sum(qry_Dashboard_Reasons.SumOfTimes) AS SumOfSumOfTimes
SELECT qry_Dashboard_Reasons.[Staff Name]
FROM qry_Dashboard_Reasons
GROUP BY qry_Dashboard_Reasons.[Staff Number], qry_Dashboard_Reasons.[Staff Name], qry_Dashboard_Reasons.[Staff Name]
PIVOT qry_Dashboard_Reasons.[1stRefuseReason];
 
Have you followed Ranman256 advice?
If you can't get it, post a sample database with some data in it + the query and the form with the graph object.
 
access is not as good as excel
when it comes to graphics.

you can use your excel file
and fill your data from your
query.

then you can export the chart
as picture (.bmp, png, etc)


Dim xlcht As Object
Set xlcht= activeworkbook.ChartObject(1).Chart
chtXL.Export FileName:=strPath, FilterName:="BMP"


use this picture on your form
as your graph.

tell you, you'll have a professional
looking chart (picture) on your form.
 

Users who are viewing this thread

Back
Top Bottom