[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Change Chart Primary and Secondary X axis maximum values using Code

Posted on 1998-08-30
2
Medium Priority
?
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
perove earned 800 total points
ID: 1960671
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
ID: 1960672
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

650 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