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
-
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
1 hour, 25 minutes ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
1 hour, 27 minutes ago -
Very Quarrelsome Taskbar!
by
CWBillow
11 hours, 39 minutes ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
14 hours, 24 minutes ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
3 hours, 9 minutes ago -
Is your battery draining?
by
Susan Bradley
3 hours, 4 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
2 hours, 59 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
18 hours, 15 minutes ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
2 hours, 21 minutes ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
2 hours, 33 minutes ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
2 hours, 23 minutes ago -
National scam day
by
Susan Bradley
2 hours, 5 minutes ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
4 hours, 22 minutes ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
1 day, 19 hours ago -
Tools to support internet discussions
by
Kathy Stevens
8 hours ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
1 day, 10 hours ago -
AI is good sometimes
by
Susan Bradley
2 days, 2 hours ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
1 day, 16 hours ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
3 days, 2 hours ago -
June KB5060842 update broke DHCP server service
by
Alex5723
3 days, 1 hour ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
3 days, 5 hours ago -
Excessive security alerts
by
WSSebastian42
1 day, 20 hours ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
3 days, 14 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
5 hours, 4 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
3 days, 1 hour ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
1 day, 19 hours ago -
OS news from WWDC 2025
by
Will Fastie
1 day, 5 hours ago -
Need help with graphics…
by
WSBatBytes
2 days, 10 hours ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
4 days, 6 hours ago -
Totally remove or disable BitLocker
by
CWBillow
3 days, 5 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.