dbTalk Databases Forums  

Macros to run and export multiple reports

comp.database.ms-access comp.database.ms-access


Discuss Macros to run and export multiple reports in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Makuhari1998
 
Posts: n/a

Default Macros to run and export multiple reports - 01-10-2004 , 12:03 PM






Is it possible to create a macro that will open 7 reports at once and
automatically export the results of each report into Excel? Can the
results be exported into the same Excel workbook, or will they be in 7
different workbooks? Can I create a button on the main form of my
database to run this macro?

Also, is it possible to write a macro that can open several *queries*
at once and export them into Excel? If so, will the data labels of the
fields be exported into Excel as well?

Thanks for your assistance with my questions.


Reply With Quote
  #2  
Old   
Ira Solomon
 
Posts: n/a

Default Re: Macros to run and export multiple reports - 01-11-2004 , 11:01 AM






You can export as many tables or queries as you wish in a macro . No
probelm.
Reports are documents and I can think of no simple method that would
work. It can be done with code, where you literally write the
spreadsheet cell by cell, but that can require quite a lot of code
depending on what you are doing. I know, I had to do it once.

Going back to queries, it will give you the field names and if you
export multiple queries to the same sheet you will have multiple tabs
in the sheet.

Use the transfer spreadsheet command in the macro.
Be sure to specify export, specify the full path of the sheet you are
creating (or updating after the first line, and Choose yes for field
names. I don't know if it will do Memo fields or OLE objects.

The command button wizard will let you create a run macro button in a
form with no problem.

Good Luck
Ira Solomon

On Sat, 10 Jan 2004 18:03:03 GMT, Makuhari1998
<makuhari1998 (AT) yahoo (DOT) com> wrote:

Quote:
Is it possible to create a macro that will open 7 reports at once and
automatically export the results of each report into Excel? Can the
results be exported into the same Excel workbook, or will they be in 7
different workbooks? Can I create a button on the main form of my
database to run this macro?

Also, is it possible to write a macro that can open several *queries*
at once and export them into Excel? If so, will the data labels of the
fields be exported into Excel as well?

Thanks for your assistance with my questions.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.