Solved

Change Chart Primary and Secondary X axis maximum values using Code

Posted on 1998-08-30
2
245 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
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

809 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