Graphing negative values on Access chart

Ethvia

Board Regular
Joined
Mar 10, 2009
Messages
63
Good morning!

I have a bar graph that has both positive and negative values. I want to set it up so that the negative values show as a red bar and the positive values are a green bar. I can do this in excel easily, but need it done in Access due to automation.

If I use the old style graphs, I can almost get the coloring to work (I have to use patterns), but the X axis sits in the middle of the graph with the negative values below and the positive values above. If I use the new graphs then I can't get the colors to change (red for negative and green for positive).

I'd rather use the new graph format if possible because it looks cleaner.

I've searched all over google for hours and have yet to find a solution. Does anyone know of a way to accomplish this?
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
need it done in Access due to automation.
If that means you're using automation, then why not push the data to Excel and use its graphing capabilities? Long ago, I gave up on Access charts because of their limitations and funky behaviour. It got to the point where I say that I'd rather rub sand in my eyes than use Access graphing. Maybe some things changed over the years, but by the sounds of it, not enough.

Anyway, if you don't get a simple solution and you're working in Access, consider using automation to populate a dynamic named range in Excel and base your graph on that. A dynamic range would mean that your graph gets its values from a moving range and not certain number of rows and columns. You could even use Access code to open up the sheet for presentation.
 
Upvote 0
If that means you're using automation, then why not push the data to Excel and use its graphing capabilities? Long ago, I gave up on Access charts because of their limitations and funky behaviour. It got to the point where I say that I'd rather rub sand in my eyes than use Access graphing. Maybe some things changed over the years, but by the sounds of it, not enough.

Anyway, if you don't get a simple solution and you're working in Access, consider using automation to populate a dynamic named range in Excel and base your graph on that. A dynamic range would mean that your graph gets its values from a moving range and not certain number of rows and columns. You could even use Access code to open up the sheet for presentation.
Thanks very much for the reply

I would love to push the data into Excel but haven't had much luck with that. The closest I was able to get was to push data from Access into a SharePoint list, and then wrote a Power Automate script to that the data from the list and move it into Excel. If you have any links to info on how to do what you're saying I'd love to take a look at it. You're correct...Excel graphs are far better than Access graphs, but I can't have anyone putting it together manually.
 
Upvote 0
This is my goto spot for automation. Won't help you with dynamic named ranges though. You should not need Sharepoint unless (maybe) you are dealing with multi value fields which IMO, should not ever be in a db.

 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,282
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top