Display the total on the top of each bar in chart on the forms

Derek

Registered User.
Local time
Today, 11:38
Joined
May 4, 2010
Messages
234
Hi Guys

I haven't worked with charts on Forms before and I am given a task to make a minor change in the already existing chart in Access Form. Please see attached the chart. The rowsource property of the chart is set to as below:
Code:
 SELECT tblstaff.[Staff Name], Sum(IIf([DateComp] Is Null And [DateDue]>=Date() And [DateDue]<=Date()+14,1,0)) AS Due, Sum(IIf([DateComp] Is Null And [DateDue]<Date(),1,0)) AS [Past Due]
FROM (tblstaff INNER JOIN tblAction ON tblstaff.[Staff Number] = tblAction.Owner) INNER JOIN tblProject ON tblAction.ProjectID = tblProject.ProjectID
GROUP BY tblstaff.[Staff Name], IIf([EndDate] Is Null,1,0), tblstaff.[End Date]
HAVING (((IIf([EndDate] Is Null,1,0))=1) AND ((tblstaff.[End Date]) Is Null))
ORDER BY Sum(IIf([DateComp] Is Null And [DateDue]<=Date()+14,1,0)) DESC;

I have to make a change i.e to display total of (Blue+Grey) of each bar on the top of each bar. So that means for David Packer , It should show 15 on the top of Bar. for Nick Smith, it should show 11 on the top of the bar. etc.

Can anyone let me know what do I need to do? Please see attached a "Copy of Book1" to have an idea what exactly I want but I have to use Access form for that.

Thanks
 

Attachments

Can anyone please help me in this?

Thanks
 
Not sure if this will do what you want - I'm using 2010 so may be different or not available in earlier versions

It looks like you are using a chart control, if so, do the following

1. in form design view, select the control
2. then right click and select Chart Object>Edit which should open a new ribbon across the top. At the left end of the ribbon will be a drop down list of all the chart objects.

For each series do the following

3. select it from the dropdown or by simply click on the series
4. then right click and select 'Format Data Series'
5. click on the data label tab and tick value

That should be all you need to do - on my system it displays the value at the top of the bar.

Since you have a stacked bar, it may be you need another series for the total but hide the actual total series bar
 
just done a bit more experimenting - you do need another series for the stacked bar to show the total. Once created, you can drag the label to where you want it
 

Users who are viewing this thread

Back
Top Bottom