dynamic - How to Dynamically Change the Rowsource of an Access Chart -


i know if there way can set rowsource property of chart in report @ run time.

i intend have chart in report's group header section. rowsource of chart should updated according group header's value.

i got error 2455 - invalid reference property rowsource when tried in vba.

i using access 2003.

thank you.

i got inspiration after searching on internet time. here solution implement.

firstly, true rowsource property of chart cannot changed programmatically @ run time. however, can set rowsource property query object , later update query object in vba.

here part of code.

currentdb.querydefs("myquery").sql = "a new query" me.mychart.requery 

i have set chart's row source query object named "myquery". placed above code in format event of group header, every time when group header loaded can use value of group header update query object.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -