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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Newbie: How to bind data to embedded excel worksheet

Status
Not open for further replies.

mavalon

Programmer
Apr 18, 2003
125
US
Let me begin by saying I am new to VBA. If anyone knows of any online tutorials or other helpful web sites that may provide some sort of solution to the following problem, please provide me with the URL. (I'd be eternally grateful.) Here's the problem:

I've created a simple Access database. The main purpose of this database is to ultimately print out a form. Simple enough. However, the form requires some special formatting that Access data tables cannot handle. The column headings MUST be diagonal. Excel can format text this way, while Access cannot. I would like to embed an excel spreadsheet inside my Access report. I tried to create an OBJECT FROM FILE. (the file being my formated worksheet). I selected "Link" checkbox, because the worksheet only provides the formatting while the data comes from the access database. Now, the question is: How in h@ll do I bind data from a Crosstab Query to the appropriate data cells in my embedded Excel Worksheet? I.e., how do I make it a bound object?

I appreciate any help you geniuses can provide. :)
 
Create a live link to the table or query from within excel,

From excel click Data>Get External Data>New Database Query>....the choose msaccess databases* from the list...follow the wizard from there (to select your mdb, table or query)
then return your data to excel.

You can opt to use the wizard or MsQuery (a gui type interface, similar to access)at this point...
after your comfy with this...I would recommend the MsQuery option.



when data is returned,...you can right click in the data and select properties to refresh on open...auto fill formulas etc.

this is now a live link, any time the workbook is opened. your current / up to date access data comes in (if you set the refresh on open option)

setup your form in excel based on the imported data

now when you launch this from access, it should reflect the results on your xtab query







 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top