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.
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.