Access form and MS Chart

S

SF

Hi,

I have a database use to collect program indicators. I want to use Access
form to present the data so I came up with a main Form and two more subforms
(one for table and one for graph/chart). I have two comboboxes that use to
filter subform1 and subform2. I have no problem linking main and subform1.
There is some problem with subform2 that use to generate chart/graph as
follow:

1 - I cannot change the chart title, It reflect the query name
2 - I cannot reformat font display, the character appear too big

How do I fix thses problem?

SF
 
A

Arvin Meyer [MVP]

I've always had difficulty with formatting charts in Access. What I
generally do is to export the data to an Excel Range, and have the Excel
application render the chart, then import the chart back into Access as an
image. The pertinent code to create the image is:

Dim appXL As Excel.Application
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim wkb As Excel.Workbook
Dim wks As Excel.Worksheet
Dim rngCurr As Excel.Range
Dim chtXL As Excel.Chart
Dim strPath As String

' ...
Set chtXL = wks.ChartObjects(1).Chart
chtXL.Export FileName:=strPath, FilterName:="GIF"

'FilterName:="JPG" also works.
 
S

SF

Thank.

SF

Arvin Meyer said:
I've always had difficulty with formatting charts in Access. What I
generally do is to export the data to an Excel Range, and have the Excel
application render the chart, then import the chart back into Access as an
image. The pertinent code to create the image is:

Dim appXL As Excel.Application
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim wkb As Excel.Workbook
Dim wks As Excel.Worksheet
Dim rngCurr As Excel.Range
Dim chtXL As Excel.Chart
Dim strPath As String

' ...
Set chtXL = wks.ChartObjects(1).Chart
chtXL.Export FileName:=strPath, FilterName:="GIF"

'FilterName:="JPG" also works.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
A

aaron.kempf

that's got to be the stupidest fucking thing I've ever heard of in my
life.

Office Web Components has a method to do this natively

-Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top