Solved

Change Chart Primary and Secondary X axis maximum values using Code

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
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, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

749 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