vince said:
Hi,
i currently export from Access to Excel in order to leverage Excel's
advanced charting features.
Is there a way to generate those Excel charts directly from Access?
It is the same engine that is used for both, but as you have discovered, the
charting engine is better implemented in Excel than Access. My experience is
that this has been true over the last 10 years. So what can you do about it?
What I do is open Excel in memory, push the data from an Access query into
an Excel range or into specific cells, ala this Access Web article:
http://www.mvps.org/access/modules/mdl0006.htm
then using the export image method of the chart object in Excel:
Set chtXL = wks.ChartObjects(2).Chart
chtXL.Export FileName:=strPath, FilterName:="GIF"
I then use an image control in Access to display the image:
Me.imgControlName.Picture = strPath
The process on a reasonably fast machine (2.3 GHz, 512 MB) takes slightly
under a second to run and update the image control.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access