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, 9 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
-
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
59 minutes ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
2 hours, 18 minutes ago -
Tools to support internet discussions
by
Kathy Stevens
9 hours, 9 minutes ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
7 hours, 29 minutes ago -
AI is good sometimes
by
Susan Bradley
9 hours, 31 minutes ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
14 hours, 50 minutes ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
1 day, 9 hours ago -
June KB5060842 update broke DHCP server service
by
Alex5723
1 day, 8 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
1 day, 12 hours ago -
Excessive security alerts
by
WSSebastian42
3 hours, 10 minutes ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
1 day, 21 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
2 hours, 6 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
1 day, 9 hours ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
2 hours, 37 minutes ago -
OS news from WWDC 2025
by
Will Fastie
12 hours, 56 minutes ago -
Need help with graphics…
by
WSBatBytes
17 hours, 9 minutes ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
2 days, 13 hours ago -
Totally remove or disable BitLocker
by
CWBillow
1 day, 12 hours ago -
Windows 10 gets 6 years of ESU?
by
n0ads
1 day, 15 hours ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
3 days ago -
Search Forums only bring up my posts?
by
Deo
8 hours, 44 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
3 days, 11 hours ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
3 days, 4 hours ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
3 days, 12 hours ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
3 days, 22 hours ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
3 days, 23 hours ago -
Disengage Bitlocker
by
CWBillow
3 days, 13 hours ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
4 days, 1 hour ago -
New Win 11 Pro Geekom Setup questions
by
Deo
8 hours, 32 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
4 days, 8 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.