Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Graph Data to Excel

Status
Not open for further replies.

RobinHood786

Technical User
Feb 14, 2007
12
GB
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.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top