Good day all
I have a large complicated Access database with limited documentation. In my efforts to back engineer the relationships, I want to export all of the tables to Excel. Does anyone have some code that will export all of the tables into a defined folder? It gets tiresome trying to export in excess of 130 tables; and then doing it again; and again. (sigh)
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Exporting Access Tables (Access 2000)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Exporting Access Tables (Access 2000)
- This topic has 8 replies, 3 voices, and was last updated 20 years, 8 months ago.
AuthorTopicDon Wells
AskWoody LoungerSeptember 10, 2004 at 8:17 pm #409771Viewing 3 reply threadsAuthorReplies-
WSpatt
AskWoody Lounger -
WSpatt
AskWoody Lounger -
WSFrancois
AskWoody LoungerSeptember 11, 2004 at 9:05 am #876021This is DAO code so you have to set the reference to Microsoft DAO 3.6 Oject Library.
For each table in separate file :Sub ExportAllTables() Dim db As DAO.Database Dim tdf As DAO.TableDef Set db = CurrentDb For Each tdf In db.TableDefs If Left(tdf.Name, 4) "MSys" Then DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _ tdf.Name, "C:YourDirectory" & tdf.Name & ".xls" End If Next End Sub
If you want all the tables in one file, change the Docmd line to
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _ tdf.Name, "C:YourDirectoryYourFileName.xls"
-
Don Wells
AskWoody LoungerSeptember 11, 2004 at 5:54 pm #876092Francois
Thanks for the speedy and comprehensive response. I forgot to mention that during the manual exporting activity, one of the tables refused to transfer due to an urecognizable path. I suspect I am dealing with the Access equivalent of a shortcut. This was all refreshed in my memory when the error alert came up. A simple On Error Resume Next and On Error GoTo 0 surrounding the DoCmd.TransferSpreadsheet acExport, … line cured the problem. My friend; you have saved me a pile of effort. -
Don Wells
AskWoody LoungerSeptember 11, 2004 at 5:54 pm #876093Francois
Thanks for the speedy and comprehensive response. I forgot to mention that during the manual exporting activity, one of the tables refused to transfer due to an urecognizable path. I suspect I am dealing with the Access equivalent of a shortcut. This was all refreshed in my memory when the error alert came up. A simple On Error Resume Next and On Error GoTo 0 surrounding the DoCmd.TransferSpreadsheet acExport, … line cured the problem. My friend; you have saved me a pile of effort.
-
-
WSFrancois
AskWoody LoungerSeptember 11, 2004 at 9:05 am #876022This is DAO code so you have to set the reference to Microsoft DAO 3.6 Oject Library.
For each table in separate file :Sub ExportAllTables() Dim db As DAO.Database Dim tdf As DAO.TableDef Set db = CurrentDb For Each tdf In db.TableDefs If Left(tdf.Name, 4) "MSys" Then DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _ tdf.Name, "C:YourDirectory" & tdf.Name & ".xls" End If Next End Sub
If you want all the tables in one file, change the Docmd line to
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _ tdf.Name, "C:YourDirectoryYourFileName.xls"
Viewing 3 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Debian 12.11 released
by
Alex5723
11 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
3 hours, 53 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
1 hour, 23 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
21 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
20 hours, 48 minutes ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
11 hours, 13 minutes ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
23 hours, 28 minutes ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
15 hours, 44 minutes ago -
Some advice for managing my wireless internet gateway
by
LHiggins
11 hours, 25 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
17 hours, 40 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
1 day, 8 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 5 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
19 hours, 17 minutes ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
1 day, 22 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
6 hours, 52 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
10 hours, 32 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 1 hour ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 1 hour ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
1 day, 14 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
2 days, 9 hours ago -
0Patch, where to begin
by
cassel23
2 days, 3 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
2 days, 23 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
2 days, 11 hours ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 7 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
2 days, 22 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
1 hour, 6 minutes ago -
Installer program can’t read my registry
by
Peobody
39 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
2 days, 20 hours ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
3 days, 4 hours ago -
False error message from eMClient
by
WSSebastian42
3 days, 19 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.