# open an excel chart from access 2003



## slimjen (Jan 13, 2007)

a user of one of my databases wants a excel chart instead of the actual report. I can use the query to analyze the data with excel and create the chart but I can't find a way to import the chart so that the user can open. I tried creating a chart in access but it does not go as smooth as it does in excel. Can someone tell me how to do this? I looked in help and it doesn't tell me anything.


----------



## Rollin_Again (Sep 4, 2003)

Are you simply wanting to automatically open Excel and display the chart or do you want the chart to be "embedded" into an Access Report? You can use VBA to create an instance of Excel that can be used to open an existing Workbook for manipulation.

Regards,
Rollin


----------



## slimjen (Jan 13, 2007)

I want to my user to be able to click a button on a form and open the excel chart
Thanks


----------



## slurpee55 (Oct 20, 2004)

Still not completely clear what you are wanting - you can export the query to an Excel worksheet via DoCmd.TransferSpreadsheet acExport, - if that is what you want, check this thread, which is largely about that. http://forums.techguy.org/business-...specific-excel.html?highlight=Access+to+Excel


----------



## slimjen (Jan 13, 2007)

ok. I used an access query to create a chart in Excel. I found creating charts in Access a headache. Now that I have the charts in Excel, I want the user to be able to click a button on a form in access and bring up the chart created in excel. I remember I used to be able to do this in access 97 but I don't remember how.


----------



## deej (Jun 12, 2003)

Hi - here's one way

In a form (Design View) you can add an unbound object frame from the 'Tools' toolbar. Selecting Unbound Object Frame and then clicking in the form area should start the wizard for this object. There is only one dialogue box to complete (Insert Object). 

In the dialogue box: select 'Create from File'; use the 'Browse' button to find your Excel file - or enter the full path name and file name (including the .xls extension) in the 'File' box; select 'Link'; you can select 'Display as Icon' (which simply displays the Excel Icon) or you can leave it blank - in which case it will display the target object (chart); click on 'OK' when you've done all this. A frame will be created in the form. 

If you've opted for 'Display as Icon' the frame will be reasonably small, but if you opt to display 'Content' (my preference) the frame will appear pretty large in your form - but you can reduce the size in the normal way by dragging (ensure that the 'Size Mode property is set to 'Zoom'). You may want to set the Special Effect and Back Style properties too, my preference is for Raised and Transparent respectively.

The Source Doc for the frame should show your Excel path and filename. In the Source Item property you should enter the chart name from the Excel workbook. Set the Auto Activate property to Double-Click (in Access 2000 there is no Single-Click option - I dont know if later versions provide this) and ensure that the Enabled. property is set to Yes.

Thats about it. Save the form, close it and reopen in Form View. Double-clicking on the frame should (after much grinding and whirring on my old machine) open the specified chart. 

You can also add a 'OLE Object' field to a table and add a link to a chart in each record (copy the chart in Excel, go to the table and use 'Edit/Paste Special/Link' to paste the link into the 'OLE Object' field). If you then create a form bound to the table you can add the field to display each chart in a separate record (doube-click on the field to display the linked chart)

Deej


----------



## slimjen (Jan 13, 2007)

Thank You Deej!! That's exactly what I wanted. :up:


----------



## deej (Jun 12, 2003)

Good - have fun! Deej


----------

