Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Can I Import Relationships When Importing Tables
Tom Juric 
      
6 months ago
Using Access 2021 32 bit standalone.
I have an ACCDE file that periodically needs updating (Forms and Tables). Currently I import the form or table FROM the accde into my accdb. When I import either of these, the import adds a "1" to the end to differentiate it from the original. I then delete the original and rename the import.  When I import tables, the relationships do not come with the import. Is there a way to get these relationships so I don't have to keep recreating them.
Richard Rost  @Reply  
          
6 months ago
Short answer is no, not automatically. When you import tables into Access, the table structure and data come over, but relationships do not. Relationships live at the database level, not inside the table itself, so Access treats them as separate metadata and leaves them behind. That is why when you import tables one at a time, you always end up having to recreate the relationships manually.

There are a few ways to make this less painful. If you import all related tables in one operation using External Data -> Access, Access will usually recreate the relationships for you as long as the table and field names match exactly.

Another approach is to use a staging ACCDB that already has all the tables and relationships defined. You update that database, verify everything looks good, then replace the old one or relink to it. You can also export the entire database to a new ACCDB and then delete what you do not need. It is clunky, but relationships are preserved because they were never lost in the first place.

If this is something you do repeatedly, the most robust solution is to recreate the relationships with DAO in VBA so it is a one-click operation instead of busywork. This is more complicated, but makes for the best solution.

One important side note is the "1" that Access appends to imported tables. That only happens because the table already exists. If you delete the old table first and then import, the name will stay the same and any automated relationship logic becomes much simpler.

Also, and this is worth saying, re-examine why you need global system relationships in the first place. Personally, I rarely use them unless I have a very specific reason. Cascade updates are never necessary because I always use autonumbers. Cascade deletes are dangerous, and I do not like letting the engine silently delete related data behind my back. I handle most of that logic explicitly in code so I know exactly what is happening and when.

In many databases, relationships are more about documentation than enforcement. If you can handle validation, updates, and deletes cleanly in code, you may not need to rebuild relationships every time at all.

Hope this helps.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/20/2026 12:45:43 PM. PLT: 1s