ACC97: How to Change a Chart's Colors Dynamically (181598)
The information in this article applies to:
This article was previously published under Q181598 Advanced: Requires expert coding, interoperability, and multiuser skills.
SUMMARY
You can change the colors of a chart dynamically to correspond with the
data in the current record of a form or a report, or to reflect special
conditions of the data. During the Current, Format, and Print events,
the data displayed in a chart is not normally synchronized with the data in
the current record of the form or the report. Because you must use a Visual
Basic for Applications procedure to clear and reload the data of a chart
every time that one of these events occurs, you can use the same procedure
to change the colors of each data point on the graph.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
NOTE: A demonstration of the technique used in this article can be seen
in the sample file, Grphsm97.exe. For information about how to obtain
this sample file, please see the following article in the Microsoft
Knowledge Base:
186855
ACC97: Microsoft Access 97 Sample Graphs Available in Download Center
REFERENCES
For further information about manipulating a chart with Visual Basic for
Applications code, see the file Vba8grp.hlp; this file is located in the
Morehelp subfolder of the Valupack folder on your Microsoft Office 97
Professional Edition CD-ROM or your Microsoft Access 97 CD-ROM.
Modification Type: | Minor | Last Reviewed: | 9/13/2006 |
---|
Keywords: | kbhowto kbProgramming KB181598 |
---|
|