Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart Object Properties

Status
Not open for further replies.

IanGalletly

Programmer
Jun 17, 2003
16
0
0
GB
I am trying to change the display of a chart on a form in Access 2000.

I have some code that changes the charttype between xlAreaStacked and xl3DBarStacked which works fine.

However, to try and tied up the display I would also like to change the text alignment. If the form starts with glbOverviewRows = "Months", the code works correctly, however if the data dictates the form starts as xl3DBarStacked then I am getting an error of "1004: Unable to get the TickLabels property of the Axis class" on the high-lighted line.


With OverviewChart

If glbOverviewRows = "Months" Then

.ChartType = xlAreaStacked

With .Axes(xlCategory, xlPrimary).TickLabels
.Orientation = xlUpward
End With

Else

.ChartType = xl3DBarStacked

With .Axes(xlCategory, xlPrimary).TickLabels
.Orientation = xlHorizontal
End With

End If

End With

I seem to need to 'requery' the chart object after the first charttype change to expose the axes collection fully.

Any suggestions please
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top