RobinHood786
Technical User
I'm re-posting this from the form Forum as mistakenly posted it there
I’d like to export data from a graph to excel where the query is built in the ‘Row Source’ of the graph rather then being defined as a named query (hope this makes sense)
Ordinarily I have been using something like
DoCmd.OutputTo acQuery, "QueryName", "MicrosoftExcel(*.xls)", "", True, ""
However, because of the way I’ve built this query I don’t know how to refer to it (the name would normally go in place of “QueryName” above.
The graph is named Graph5 and is on a from called ‘RefByArea’.
To rephrase in case the question’s too disjointed
How do I refer to the data in Me.Graph5.RowSource so I can export the data using;
DoCmd.OutputTo acQuery, "QueryName", "MicrosoftExcel(*.xls)", "", True, ""
I know I could just save this as a query and just refer to it, but I got lots of graphs (100+) built this way and don’t want to convert them all.
I'm hoping to be able to refer to the rowsource in vba, something like myData = Me.graph5.sourcedata and then use mydata as the query name.
Many thanks
Apologies if this question is badly worded but I can’t think of how to explain it more clearly.
I’d like to export data from a graph to excel where the query is built in the ‘Row Source’ of the graph rather then being defined as a named query (hope this makes sense)
Ordinarily I have been using something like
DoCmd.OutputTo acQuery, "QueryName", "MicrosoftExcel(*.xls)", "", True, ""
However, because of the way I’ve built this query I don’t know how to refer to it (the name would normally go in place of “QueryName” above.
The graph is named Graph5 and is on a from called ‘RefByArea’.
To rephrase in case the question’s too disjointed
How do I refer to the data in Me.Graph5.RowSource so I can export the data using;
DoCmd.OutputTo acQuery, "QueryName", "MicrosoftExcel(*.xls)", "", True, ""
I know I could just save this as a query and just refer to it, but I got lots of graphs (100+) built this way and don’t want to convert them all.
I'm hoping to be able to refer to the rowsource in vba, something like myData = Me.graph5.sourcedata and then use mydata as the query name.
Many thanks
Apologies if this question is badly worded but I can’t think of how to explain it more clearly.