Solved

Change Chart Primary and Secondary X axis maximum values using Code

Posted on 1998-08-30
2
240 Views
Last Modified: 2008-02-01
I have a chart on a form which is linked to a query. All I want to do is be able to
change the Primary and Secondary X axis maximum values using code. I am working in Access97.
0
Comment
Question by:Decorules
2 Comments
 
LVL 9

Accepted Solution

by:
perove earned 200 total points
Comment Utility
You have to use automation
here is an exapmle that should help you on
sub change()
Dim GraphObj As Object
Dim GraphObj1 As Object
Set GraphObj = Me![MyGraph].Object.Axes(xlValue)'x axixis is default
Set GraphObj1 = Me![MyGraph].Object.Axes(xlValue, xlSecondary)
GraphObj.MaximumScale = 100
GraphObj1.MaximumScale = 300
end sub

perove
0
 

Author Comment

by:Decorules
Comment Utility
Thanks. Worked great.

I had to open the form in design view first before appling the code. I also had to add MSChart libary to my referances. But once I had worked that out it worked great.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now