Microsoft Graph Chart issue in Access2007

P

praveen

Hi All,

I was wondering if I could get some help. I have a working solution in
Access2003. Now I want to open the solution using Access2007. However, I am
getting runtime error in opening Charts. I am using VBA to open the report
chart. I am setting the Record Source in runtime though. I am executing the
method Requery() to get the updated data. This code was absolutely working
fine in Access2003. However, it is throwing runtime error when I open in
Access2007.

Error Message="Microsoft office Access doesn't allow to use this method in
the current view".

I tried to change the view to "acViewLayout" and "acViewReport" though.
However no luck!!!

code:
'Opening the Chart Report
DoCmd.OpenReport "Summary_Costs_Chart", acViewPreview

'Setting new SQL
CurrentDb.QueryDefs("Cost_Chart_Query").SQL = strSQL

'Fire the query to get latest data
OLEUnbound0.Requery

I would appreciate any help regarding this.
 
D

DanH

Recreate your Form or Report from a blank form or report and past the chart
in then copy the VBA code. The connection to methods and events should
reconnect after that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top