configure chart property

I

iccsi

I would like to access chart property to configure axis and scale
range on Report open.

Are there any example on the internet?
Can any one give me some link to do this task?

Your help is great appreciated,
 
D

Duane Hookom

I generally:
- create a similar chart in Excel,
- turn on the macro recorder,
- change the properties,
- turn off the macro recorder,
- Find and copy the code that was created
- paste the code into the On Format event of the report section containing
the chart
- modify the code to reference the report's chart control
 
I

inungh

I generally:
- create a similar chart in Excel,
- turn on the macro recorder,
- change the properties,
- turn off the macro recorder,
- Find and copy the code that was created
- paste the code into the On Format event of the report section containing
the chart
- modify the code to reference the report's chart control

--
Duane Hookom
Microsoft Access MVP







- Show quoted text -

Thanks millions,
 
I

inungh

I generally:
- create a similar chart in Excel,
- turn on the macro recorder,
- change the properties,
- turn off the macro recorder,
- Find and copy the code that was created
- paste the code into the On Format event of the report section containing
the chart
- modify the code to reference the report's chart control

--
Duane Hookom
Microsoft Access MVP







- Show quoted text -

Thanks millions for the helping,
I tried to reference my chart Graph134.ReversePlotOrder = True and get
compile ok, but I got object required at run time.

Should I set a varaible for the chart or I have to access the chart in
certain event?


Your help is great appreciated,
 
D

Duane Hookom

You can try use code like:
Dim chrt As Object
Set chrt = Me.Graph134
chrt.ReversePlotOrder = True
 
I

inungh

You can try use code like:
    Dim chrt As Object
    Set chrt = Me.Graph134
    chrt.ReversePlotOrder = True

--
Duane Hookom
Microsoft Access MVP








- Show quoted text -

Thanks millions,
 
I

inungh

You can try use code like:
    Dim chrt As Object
    Set chrt = Me.Graph134
    chrt.ReversePlotOrder = True

--
Duane Hookom
Microsoft Access MVP








- Show quoted text -

I got "object does not support this property or method."
It seems that MS Access does not support to change Plot order.

Thanks again for helping,
 
I

inungh

You can try use code like:
    Dim chrt As Object
    Set chrt = Me.Graph134
    chrt.ReversePlotOrder = True

--
Duane Hookom
Microsoft Access MVP








- Show quoted text -


Exel marco like the following:

With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = True
.ScaleType = xlLogarithmic
.DisplayUnit = xlNone
End With

My Access code like following:

Dim chrt As Object

Set chrt = Me.chtDetails

chrt.Axes.ReversePlotOrder = False

and get object does not support this property or method.
What is xlValue in Access?
It seems that I need pass some informaiton to Chart.Axes?

Thanks again,
 
D

Duane Hookom

Maybe the 3rd time, this will get through successfully rather than "Service..
not available" :-(

Open the debug window in Excel VBA and enter:
+-------------
| ? xlValue
| 2
Try use the 2 in your Access code
chrt.Axes(2).ReversePlotOrder = False
 
I

inungh

Maybe the 3rd time, this will get through successfully rather than "Service..
not available" :-(

Open the debug window in Excel VBA and enter:
+-------------
 | ? xlValue
 | 2
Try use the 2 in your Access code
 chrt.Axes(2).ReversePlotOrder = False

--
Duane Hookom
Microsoft Access MVP













- Show quoted text -

Thanks millions,
I got "unable to set ReversePlotOrder property of the Axis class"
It seems that MS Access can access the property, but can not set.
Do you have any work around?

Thanks again,
 
D

Duane Hookom

I'm not sure what the ReversePlotOrder property does. Do you have to do
change this dynamically in the chart or can you set it manually in design
mode?
 
I

inungh

I'm not sure what the ReversePlotOrder property does. Do you have to do
change this dynamically in the chart or can you set it manually in design
mode?

--
Duane Hookom
Microsoft Access MVP







- Show quoted text -

Yes, I can set in design mode.
Because my chart has different order on the Y axis, for example, chart
one is from small to big number, but chart 2 is from big number to
small.

I need change it accordingly depends on the chart using code.

Thanks again,
 
I

inungh

I'm not sure what the ReversePlotOrder property does. Do you have to do
change this dynamically in the chart or can you set it manually in design
mode?

--
Duane Hookom
Microsoft Access MVP







- Show quoted text -

I just wonder that the properties of the chart are read only that user
is unable to modify it using VBA code.

Thanks again,
 
D

Duane Hookom

I'm not sure which properties are read-only in at run-time. I would expect
the row source is generally read-only since the record sources of subreports
are read-only. I think the order values are displayed is related to the row
source.
 
I

inungh

I'm not sure which properties are read-only in at run-time. I would expect
the row source is generally read-only since the record sources of subreports
are read-only. I think the order values are displayed is related to the row
source.
--
Duane Hookom
Microsoft Access MVP







- Show quoted text -

Thanks millions,
It makes sense now,

Thanks very much for helping,
 

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