SeadnaS
Programmer
- May 30, 2011
- 214
Hi folks,
I have a chart on a form which I am exporting to jpeg with the following sub in a buttons on click event:
Private Sub jpeg1_Click()
On Error GoTo Err_jpeg1_Click
Me.Graph1.Export "c:\DATABASE GRAPHS\Throughput_Vs_Target.jpg", "JPEG"
Me.Graph1.Locked = False
Me.Graph1.Enabled = True
Me.Graph1.Action = acOLEClose
Exit_jpeg1_Click:
Exit Sub
Err_jpeg1_Click:
MsgBox Err.Description
Resume Exit_jpeg1_Click
End Sub
The problem is every time I export it cuts off a chunk of text from the end of my chart labels. Has anybody else seen this before and fixed it? I can't find any help online.
Also is there a way to export charts to jpg/gif from a report? I have tried putting the following in the detail sections on format event on my report:
Me.Graph1.Export "c:\DATABASE GRAPHS\Throughput_Vs_Target.jpg", "JPEG"
... but this keeps producing an OLE error and closes access.
I have a chart on a form which I am exporting to jpeg with the following sub in a buttons on click event:
Private Sub jpeg1_Click()
On Error GoTo Err_jpeg1_Click
Me.Graph1.Export "c:\DATABASE GRAPHS\Throughput_Vs_Target.jpg", "JPEG"
Me.Graph1.Locked = False
Me.Graph1.Enabled = True
Me.Graph1.Action = acOLEClose
Exit_jpeg1_Click:
Exit Sub
Err_jpeg1_Click:
MsgBox Err.Description
Resume Exit_jpeg1_Click
End Sub
The problem is every time I export it cuts off a chunk of text from the end of my chart labels. Has anybody else seen this before and fixed it? I can't find any help online.
Also is there a way to export charts to jpg/gif from a report? I have tried putting the following in the detail sections on format event on my report:
Me.Graph1.Export "c:\DATABASE GRAPHS\Throughput_Vs_Target.jpg", "JPEG"
... but this keeps producing an OLE error and closes access.