How to add custom colors in Microsoft Graph, within MS Access

I'm automating some reports (containing various charts and graphs) in ACCESS that will print and email to certain recipients daily.  (I mention that because, that is just ONE reason I'm not using EXCEL)

I have never been too thrilled with how CHARTS are built in ACCESS, but have always muddled through it.   My problem is this customer has some very specific colors and ideally I would use those colors in the DONUT, COLUMN and BAR charts I'm creating.    

Is there a way to add a Custom Color Palette in MICROSOFT GRAPH?
TechGuiseAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
Not easily.  There is probably no way in the interface to change the pallet but you should be able to control individual items via VBA.  I can't offer you code.  What I do is open Excel and create a chart of the same type.  Then I turn on  the macro recorder and attempt to perform the Action with Excel.  If it is available via the interface, i do it and stop the recorder.  Then I use the generated code in Access and usually it will work or possibly might need some syntax changes.  Prior to A2007, this was pretty reliable because Access used the same charting object that Excel used but these days the objects have diverged and so you may not have the same level of success.  Or, you could get lucky and an Excel expert will drop in with the code you need.  I'm going to add Excel to the topics list to see who we can get.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:
If this is even possible, ...it might not even be worth the trouble...

First you would have to design the custom Color Palette in the format that Microsoft needs (AFAIK, this is unknown for ms access)
Then you would have to know "how" to load this pallet
Then you would have to know all the codes for all your custom colors (possibly using HEX)
Then you would have to know the correct vba syntax to get the the specific chart element you want to apply it to...
   something like this perhaps?:
   YourChart.FullSeriesCollection(1).Points(2).ForeColor= #008000 'Green

As you know, ...Access does not allow you to specify colors up front, ...you have to create the chart, ...then use VBA to manipulate the colors (or do this manually in design view)

I think I can dig up some generic code to change colors, ...I will see what I have tonight

JeffCoachman
0
TechGuiseAuthor Commented:
Sounds like a lot of trouble for something that doesn't warrant it.   I was ready to give up the idea after the initial "Then you would have to..."

Thanks for the reply,
0
TechGuiseAuthor Commented:
Putting this in the "Give up" column.  Not worth the trouble.   All of the functionality will eventually be moved to something online getting it's data from a hosted SQL server.   So sense in getting to crazy trying to make it perfect now.
Thanks for the input.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.