My Assistant
![]() ![]() |
|
|
Apr 21 2004, 06:50 PM
Post
#1
|
|
|
New Member Posts: 19 From: Tucson, AZ |
I need to export multiple Access tables from the same DB to an Excel workbook. Ideally, the tables would be different worksheets in the same workbook. Even more ideally, the process would be possible using a macro that I could attach to a button on an Access form. Is this possible and how?
|
|
|
|
Apr 21 2004, 10:01 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 6,250 From: Khon Kaen, Thailand |
|
|
|
|
Apr 21 2004, 10:37 PM
Post
#3
|
|
|
New Member Posts: 19 From: Tucson, AZ |
Thanks! This looks like what I need. I will have at it and post any revisions.
|
|
|
|
Apr 21 2004, 10:52 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 6,250 From: Khon Kaen, Thailand |
|
|
|
|
Apr 26 2004, 10:47 PM
Post
#5
|
|
|
New Member Posts: 19 From: Tucson, AZ |
First, I have to say that this place rocks out loud. Second, here is another take on exporting an Access table to an Excel workbook, where 8 references Excel versions 8-10, TABLENAME is the table you want to export, and EXCELWORKBOOKNAME is the destination workbook. Additional exports to the same workbook will be added as subsequent worksheets.
Function Copy_Data_to_Excel() On Error GoTo Copy_Data_to_Excel_Err DoCmd.Echo False, "Exporting data..." DoCmd.TransferSpreadsheet acExport, 8, "TABLENAME", "c:\EXCELWORKBOOKNAME", True, "" DoCmd.Echo True, "" MsgBox "The data were exported.", vbInformation, "Data Exported" Copy_Data_to_Excel_Exit: Exit Function Copy_Data_to_Excel_Err: MsgBox Error$ Resume Copy_Data_to_Excel_Exit End Function |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 01:07 AM |