G
Guest
I have a form, Salesperson, that has a subform Salesperson_SalesGraph. The
SalesGraph subform is a pivot chart.
I'm having problems with trying to access items on the subform. The
weirdest part is that it seems to work if i call the event from form_open,
but doesn't work if i move the code to form_current. This won't work for me,
as i need the function called whenever i change rows.
The error received is: You entered an expression that has an invalid
reference to the property Form/Report.
First I had the code on the main form, accessing the chart object on the
subform but was getting errors that i couldn't access the form property in
the assignment, Set objChartSpace = Me.salesperson_salesgraph.Form.ChartSpace
(i tried a number of differnet ways, with !'s, with
Forms("SalesPerson_SalesGraph), etc.
Then i moved the code to the subform and now i'm just trying to call the
publically declared sub with the line:
Forms!Salesperson!Salesperson_SalesGraph.UpdateLegend
or
Me.Salesperson_SalesGraph.Form.UpdateLegend
The subform has a sub declared as:
Public Sub UpdateLegend()
Any thoughts?
Thanks!
-B
SalesGraph subform is a pivot chart.
I'm having problems with trying to access items on the subform. The
weirdest part is that it seems to work if i call the event from form_open,
but doesn't work if i move the code to form_current. This won't work for me,
as i need the function called whenever i change rows.
The error received is: You entered an expression that has an invalid
reference to the property Form/Report.
First I had the code on the main form, accessing the chart object on the
subform but was getting errors that i couldn't access the form property in
the assignment, Set objChartSpace = Me.salesperson_salesgraph.Form.ChartSpace
(i tried a number of differnet ways, with !'s, with
Forms("SalesPerson_SalesGraph), etc.
Then i moved the code to the subform and now i'm just trying to call the
publically declared sub with the line:
Forms!Salesperson!Salesperson_SalesGraph.UpdateLegend
or
Me.Salesperson_SalesGraph.Form.UpdateLegend
The subform has a sub declared as:
Public Sub UpdateLegend()
Any thoughts?
Thanks!
-B