Link to home
Start Free TrialLog in
Avatar of merdeka
merdekaFlag for Canada

asked on

Access 2007 graph - program axes scale

I have an Access report that has a bar chart object on it.  I would like to programatically change the horizontal axis based on some date values from a table.  Also the horizontal axis is numeric rather than time value - can this be changed to time value programatically so it can display full months?

Here is the code that doesn't work:

Private Sub Report_Open(Cancel As Integer)
Dim graphObj As Object

Set graphObj = Me!Graph0
 graphObj.Axes(2).MinimumScale = 10000
 
End Sub]

The error message is:

Runtime error '438'
Object doesn't support this property or method

If I put this code in the graph object On_click event the axis scale changes but I don't want to have to click the graph to make it work properly especially since the report has 4 overlapping graphs.

End Sub

Thanks,
merdeka
SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of merdeka

ASKER

Jeff,

I awarded you the points but at the bottom it asks for my reason for awarding myself the points - I'm not sure where that came from or what it means.

merdeka
<at the bottom it asks for my reason for awarding myself the points>
There seem to be some issues with closing question...
It should be fixed shortly...
;-)

Jeff
The bottom line is that in the source query you can format the field to display the Full month name.

;-)

JeffCoachman
Avatar of merdeka

ASKER

OK, thanks.

merdeka