Access form and MS Chart

  • Thread starter Thread starter SF
  • Start date Start date
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
 
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.
 
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
 
that's got to be the stupidest ****ing thing I've ever heard of in my
life.

Office Web Components has a method to do this natively

-Aaron
 
Back
Top