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 Expert 7    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Explicit Relationship
Mark Young 
    
2 years ago
Is there any reason why you would not want to set an Explicit Relationship between the GroupT and the GroupXCustomerT?

Simply because it isn't needed...?
Mark Young OP  @Reply  
    
2 years ago

Adam Schwanz  @Reply  
           
2 years ago
Unless you need to use referential integrity or the cascade delete stuff for some reason, theres no need to use that.
Mark Young OP  @Reply  
    
2 years ago
Adam,

Thanks for your reply...

So the only time to set an Explicit Relationship would be when you want Referential Integrity in order to Cascade Update or Delete Records then, is that correct?

Further, do I understand correctly that When setting Referential Integrity, Cascade Update is automatic and I don't have to necessarily check that box?
Adam Schwanz  @Reply  
           
2 years ago
I almost never use the relationship window and just handle the relationships outside of it. Referential Integrity, Cascade Update, and Cascade Delete are 3 separate things. I don't believe cascade update is automatic, i think you need to check it. Referential integrity is for preventing orphans mostly (this is what says you cant delete this record a related record is in another table, and you have to delete that one first).
Kevin Yip  @Reply  
     
2 years ago
You need referential integrity to prevent accidental deletions for the most important tables in your database.  If you hit the Delete key by accident while selecting a row in a parent table, referential integrity will prevent the deletion.  This is a "prevent you from yourself" kind of thing.  If you are the admin and you have all access to everything, then you are the one who needs the most protection, not your users.  A deletion like that could be big trouble.  If the deleted ID field is autonumber, you can't bring that back because autonumbers don't repeat.
Alex Hedley  @Reply  
           
2 years ago
Mark Young OP  @Reply  
    
2 years ago
Adam,

Thanks for your response.
Mark Young OP  @Reply  
    
2 years ago
Kevin,

Thanks for reaffirming what Referential Integrity does!
Mark Young OP  @Reply  
    
2 years ago
Gents,

The initial question I have is... when do I NEED to set Explicit Relationships between the tables in the Relationships Window.

In the attached pic... The CraftLevelsT appears to me to be nothing more than Lookup Table for the CraftLevel field in the other tables and NOT in need of an Explicit Relationship being set.

Is that about right?
Alex Hedley  @Reply  
           
2 years ago
Related: Relationships
Mark Young OP  @Reply  
    
2 years ago
Gents,

Here is a screenshot from Expert Level 7 dbase... which shows that Rich is not setting Explicit Relationships between the IDs of all tables.

Is there a general rule of some sort that should determine WHEN Explicit Relationships should be set?
Mark Young OP  @Reply  
    
2 years ago

Alex Hedley  @Reply  
           
2 years ago
(I've moved this question here, no need to create a new one asking the same thing again.)

Does the above not already answer it?
Mark Young OP  @Reply  
    
2 years ago
Well... I don't necessarily see a definitive answer to the question.

Adam responded with "Unless you need to use referential integrity or the cascade delete stuff for some reason, theres no need to use that." and... "I almost never use the relationship window and just handle the relationships outside of it."

And yet, I believe it was Sami who, in another post, stated that Explicit Relationships need to be set between ALL tables. So, can you see my confusion in the ambiguity between the replies?

I'm simply looking for some sort of definitive answer or logic to when to set an Explicit Relationship because it doesn't appear to be necessary to set all of them.
Mark Young OP  @Reply  
    
2 years ago
Further, in Expert Level 2.02 Video, Rich stated that Ad Hoc Relationships are "...perfectly fine for 90% of your relationships."

So, the answer I suppose then is to set an Explicit Relatioship only when I need to use Cascade Delete.

Is this correct?
Adam Schwanz  @Reply  
           
2 years ago
Yes. You do not need to use them at all.

The only benefit (and con depending on what you're trying to do) is that you can't orphan records in the sub-tables. You can control as much or as little of that yourself in VBA if you want to. Or just remove the ability to delete all together. There's a million ways to handle the relationships outside of that relationship window. So unless you specifically need one of the 3 features it offers, and you don't want to mimic that in VBA, then you would use it. Otherwise there is no point.

It really depends on what you are trying to do. If you have users that are delete happy and will orphan all your records, then you would want to either use it, or do something else like turn off allow deletions or use VBA to control that. If you need to be able to delete records frequently for some reason and the orphan isn't an issue, then you don't need to do anything. There's not really an always answer. I just prefer to control it outside of the relationships if I need it.
Sami Shamma  @Reply  
             
2 years ago
As Adam said:

Or just remove the ability to delete all together.
Kevin Robertson  @Reply  
          
2 years ago
I almost always turn off deletions and create my own Delete button (for non-critical data) so I have FULL control over the entire process. It does pretty much depend on the database and the tables involved.
Mark Young OP  @Reply  
    
2 years ago
Thank you all for your replies!

This helps immensely!

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

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/16/2026 11:20:21 AM. PLT: 1s