3rd Post - Anyone Got Offers - Rowsource on MSGraph Control

  • Thread starter Thread starter Kahuna
  • Start date Start date
K

Kahuna

Hi Folks

I have a report the RecordSource for which is provided at OnOpen via an sql
string.

The report also has a small graph which needs to have a rowsource based on
the report RecSource.

I have

strLabProGraph = "Select...."

Me![LabProGraph].RowSource = strLabProGraph

and this gives me an sql string. However this also errors as an 'Invalid
Reference to Rowsource'.

How can I reference this graph Rowsource, and do I need to build a separate
function to access it?

Cheers
 
Thanks Duane, I have seen this response before and I know you're a main
contributor - with some neat code too - but I was hoping for a more elegant
solution (by that I mean a real reference to rowsource - not that you're
resolution wasn't elegant) - oops, digging fast here and my spade is only
small too!

I have implemented your solution Duane and it works - why cant we get a
reference to rowsource in a graph object though?

Cheers my friend, thanks for your posts this time and in the past.

--
Kahuna
------------
Duane Hookom said:
This has been asked several time previously and I think the best answer was
to base the row source on a saved query. Then change the SQL property of the
query. For instance if the Row Source was qselMyGraph, you could use code
like:

Currentdb.QueryDefs("qselMyGraph").SQL = "Select...."

This might require a reference to the DAO object library.

--
Duane Hookom
MS Access MVP


Kahuna said:
Hi Folks

I have a report the RecordSource for which is provided at OnOpen via an sql
string.

The report also has a small graph which needs to have a rowsource based on
the report RecSource.

I have

strLabProGraph = "Select...."

Me![LabProGraph].RowSource = strLabProGraph

and this gives me an sql string. However this also errors as an 'Invalid
Reference to Rowsource'.

How can I reference this graph Rowsource, and do I need to build a separate
function to access it?

Cheers
 
Back
Top