Chart Control in Access 97

J

Jonathan

Hello all,

Is there a way to set chart control properties such as Y-axis scale
parameters (maximum, minimum, major unit, minor unit, etc) programmatically?
I want to set these parameters based on values from a table.



Thanks,

Jonathan

KingsKnight1 <at> hotmail <dot> com
 
R

Rob Parker

You can refer to the properties of a chart in a bound object control on a
form or report, using the following syntax:
me.oleObjectName.Object.chartobjectname.propertyname

For example, you could use
me.oleObjectName.Object.Axes(2).MaximumScale = 50
to programmatically set the maximum of the value ("y") axis to 50.

The Help file (or maybe it's the Object Browser - I forget exactly which at
the moment) can tell you what the various properties are - but IIRC it's
rather tricky to find the info. I know the one above because I've got it in
some code to force two related charts to have the same scale ;-)

HTH,

Rob
 
J

Jonathan

Hi,

This is turning out to be more difficult than I thought it would be. I
tried a number of variations on the theme:



Private Sub Report_Open(Cancel As Integer)

Dim objChart As Object

Set objChart = Me.Graph12

objChart.Object.Axes(2).MaximumScale = Me.Text14

End Sub



No luck so far, just lots of error messages. Any help would be appreciated.



-Jonathan

KingsKnight1 <at> hotmail <dot> com
 

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