N
Naj
Hi,
I have a chart in a report and I want to use code to change the RowSource
property of the chart. I use the open event of the report to open a form in
"acDialog" window mode and ask the user to select a value from a combo box.
Then based on the chosen criteria, the recordsource of the report is changed,
as follows:
Select Case cmbQryName
Case 1
Me.RecordSource = "qryOne"
Me.Caption = "First Report"
Case 2
Me.RecordSource = "qryTow"
Me.Caption = "Second Report"
End Select
It is working alright upto this point. Now I want to add a chart to the
report and change the Rowsource property using code;
In the 'open' event of the report, I want to use the following code:
Select Case cmbQryName
Case 1
Me.RecordSource = "qryOne"
Me.Caption = "First Report"
Me.myChart.RowSource = "myQuery"
..............
.............
End Select
Here, after 'Me' the intellisense menu shows the name of the chart and I
select it from the menu. However, the intellisense menu that opens after the
chart name does not contain the property RowSource. I should be getting the
Rowsource property after the chart name, right? But the I am not getting it
there!
OR is it not the correct way to access the rowsource property of a graph in
a report? Then what is the right way to do this?
If anybody can help me, I would appreciate very much.
PS: I use unbound Object Frame to insert the Chart in the report
Thank you,
Best Regards,
Naj
I have a chart in a report and I want to use code to change the RowSource
property of the chart. I use the open event of the report to open a form in
"acDialog" window mode and ask the user to select a value from a combo box.
Then based on the chosen criteria, the recordsource of the report is changed,
as follows:
Select Case cmbQryName
Case 1
Me.RecordSource = "qryOne"
Me.Caption = "First Report"
Case 2
Me.RecordSource = "qryTow"
Me.Caption = "Second Report"
End Select
It is working alright upto this point. Now I want to add a chart to the
report and change the Rowsource property using code;
In the 'open' event of the report, I want to use the following code:
Select Case cmbQryName
Case 1
Me.RecordSource = "qryOne"
Me.Caption = "First Report"
Me.myChart.RowSource = "myQuery"
..............
.............
End Select
Here, after 'Me' the intellisense menu shows the name of the chart and I
select it from the menu. However, the intellisense menu that opens after the
chart name does not contain the property RowSource. I should be getting the
Rowsource property after the chart name, right? But the I am not getting it
there!
OR is it not the correct way to access the rowsource property of a graph in
a report? Then what is the right way to do this?
If anybody can help me, I would appreciate very much.
PS: I use unbound Object Frame to insert the Chart in the report
Thank you,
Best Regards,
Naj