Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Min/Max scale values for charts.

Status
Not open for further replies.

meeree

Technical User
Mar 29, 2007
4
CA
Currently, I have the charts designed such that min/max scale values of a given axis in the chart are governed by the dates for the data to be plotted. However, I would like to control this range by the time period selected in a form by the user. Please advise on how to do this.
 
I've figured out how to sort of do this but it doesn't work. I get the error message, "Application-defined or object defined error".

Here's my code:

Dim graphobj As Object

DoCmd.OpenReport stDocName, acViewDesign
Set graphobj = Reports![B_aAnalyticalMain].Object.Application.Chart
graphobj.MaximumScale = minTime
graphobj.MinimumScale = maxTime
DoCmd.Close acReport, stDocName, acSaveYes

Please advise.
 



Hi,

You get the message on what statement?

In cases like this, I rely on a Watch Window when I get such an error. Select Debug and then select the object throwing the error and hunt around to find what properties ARE available.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
I make it a habit of never running code outside of a report that modifies anything in the report. I would run the code in the On Format event of the section of the report containing the chart control.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top