Chart row source problem

SiE

Registered User.
Local time
Today, 22:04
Joined
Mar 1, 2002
Messages
25
I have produced a report with a chart in.

I wanted to be able to be able to change the rowsource for the chart using code. I used the on open event for the report and changed the rowsource property for the chart embedded within the report to sql A if one condition was met or sql B if second condition is met.

When the report runs it comes up with the fact that has an invalid reference to the rowsource. I go to debug and tried to step through the code and it works. This is obviously no good as I dont want the user to step through my code.

I am not sure what is causing this problem.

Any ideas?
 
Ive just searched through the forum and it seems like a lot of people have come across this problem before and no one has suggested a way to solve it. Come on people there must be a solution to this. Or is this just another known bug!
 
Well, if everything is working correctly anyway, you COULD use DoCmd.SetWarnings = False, DoCmd.SetWarnings = True to bracket this piece of code.

However, doing that when something is apparently wronger than just turning off confirmations makes my skin crawl. Hope you find a better answer.

Good luck,
David R
 
I did actually try that but it still comes up with the error. You still have to step through the code.

My work around in the end was to produce two graphs with different rowsources behind them. Then made one visible and the other invisible depending on what condition was met.

Works a treat. I would have preffered to just change the rowsource of a single graph though. guess its just one of those things.

cheers for trying dave, much appreciated
 

Users who are viewing this thread

Back
Top Bottom