• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 53
  • Last Modified:

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?
0
TechGuise
Asked:
TechGuise
  • 2
2 Solutions
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now