By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,715 Members | 1,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,715 IT Pros & Developers. It's quick & easy.

Export access data to excell

P: 20
Greetings all.

Once more I must dip into the font of your collective wisdom and request help:

I have been given the task of taking an exsisting Access Query and exporting it to excel. There are hitches. The query has two groups of records "A" and "B".

The excel spread sheet needs to display Group "A" followed by the subtotals for select fields. Next a little white space then Group "B", again followed by sub totals. With Grand totals at the end.

I cant use an access report because it produces static information. My manager wants to be able to change data in the columns once its in excel and have the totals re-calculate.

My approach would be to run the Query from VBA for Group A pasting the results directly into an excel spread sheet, then paste the formual for total fields directly into the appropriate cell on the spread sheet. I could calculate the number of rows from the record count and the fields (columns) remain constant, this would tell me where to paste the formula for totals in the right cells.

I would then add a few rows for white space and redo the same steps for Group "B".

Questions: is this method more complicated then it needs to be, if so can someone point out the best way to accomplish this? If this is a reasonable approach Can some one help me get started with the code? IM not sure how to work with the excel spread sheet. I think I need to open it as an object then use the VB to place values in spread sheet. Once stated I can do the grunt work and get the query to work with the excel peice.


Mar 13 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.