PDA

View Full Version : Inserting Excel Charts into Access - Item Source properties



Mr_IC
01-09-2016, 09:17 AM
1. I have an Excel 2010 file ("Financial_Links.xlsm") with data uplinks to our company's financial database in SQL Server
2. For compiling the data I need for financial meetings, I have created an Access 2010 database ("Financial_Data.accdb") with tables linked to each sheet in "Financial_Links"
3. I've extracted and arranged the data I want with queries
4. Due to Access's lackluster charts, I created an Excel file ("Charts.xlsm") that has a table linked to one of the queries and have made a chart ("Chart1") from that table on a separate sheet ("Estimating")
5. Back in Financial_Data.accdb, I have made a form with a tab control and on one of the tabs have inserted an Unbound Object Frame which is linked to Charts.xlsm
It pulls up the correct chart as long as the "Estimating" sheet was the last open sheet before Charts.xlsm was closed.
6. If I only needed the one chart, I would just put some code in to activate "Estimating" in the BeforeClose event. But I need to make more charts and insert them on additional tabs, so I need to point each tab's Unbound Object Frame to the correct sheet and chart in Charts.xlsm.

I believe that this doesn't require VBA and that if I go to the properties of the Unbound Object Frame and set the Source Item property correctly it will take care of this. If this is correct, I just need to know the proper syntax to use, since I'm having trouble finding any info on it and nothing I have tried as worked.

Also, are there any inherent problems with pulling data from my Access database to make a chart and then pulling that chart back into a form on the same database?

Thanks,
Isaac

jonh
01-11-2016, 07:26 AM
Double click the control to activate it. That should load Excel into Access and let you switch tabs.

Maybe not a problem exactly but the path that your data takes seems a bit unnecessarily circuitous.

sql > excel > access > excel > access

Excel has MSQuery for querying data and Access is useless at reports so I'm not sure why you're using Access at all.