RowSource with chart

G

Guest

I would like to create a Graph/Chart as a report using an SQL Statement as
RowSource. Problem is, that if I do I get an error message.
I developed the graph with the wizard, so in the property sheet of the graph
the row source is mentioned there with the name of the table or query and the
row source type is mentioned with "Table/Query". If I try to put this into
VBA in the OpenEvent of the report I get the Err Msg "that the method is not
supported".
Has anybody an idea how to programm a rowsource with an unboud chart object?
 
D

Duane Hookom

I would use a saved query as the chart's row source. Before you open the
report, change the SQL property of the saved query.

CurrentDB.QueryDefs("qMyRowSource").SQL = "SELECT...;"
 
G

Guest

Duane,
thks for your answer, but this is not what I am looking for. Our
application with all the databanks are user-protected and compiled (.mde).
All record sources for forms and reports are made with SQL statements,
because the (clients) tables with the data are in different databanks
(clients property and .mdb) and according to the client can be kept on
different harddisks (not always H: or D: or so).
According to VBA 'Help' the RowSource Property can be the following for a
chart object
----------------------------------------------------------------------------------------------
Quote:

'You can use the RowSource property (along with the RowSourceType property)
to tell Microsoft Access how to provide data to an unbound OLE object such as
a chart.
The RowSource property setting depends on the RowSourceType property setting.
For the RowSourceType setting enter the RowSource setting Table/Query and a
SQL statement. You can set the RowSource property by using Visual Basic.'
Unquot
 
G

Guest

Duane,

Thks a lot - I had a look and will try it out - at first view of this
solution from ACG Soft it seems quite complecated ; the MS Access Help
declarationdoes not correspond at all to that.
 
G

Guest

Duane,

Yes it works more or less - Thank you for your help - even though MS VBA
help is unclear about Row Source in chart objects - it is strange to have to
use the solution proposed from ACG soft - but yes , it works
 

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