Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   
 

Relating a Microsoft Access Table to Itself

Good for Head-of-Household, Genealogy Databases, etc.

Q: I�ve now completed through Access 201. What I�m faced with is generating a report very similar to the contacts report done in 104 & 201. I want it to list a primary member�s name and their information and then also list all the family members related to them via a relationship.

I�ve created both a PrimaryT, FamilyT, PrimaryF, FamilyF and PrimaryQ. In the FamilyF I have a drop down box that accesses PrimaryQ where I choose the primary member�s name that the family member is "related" to. I�m having difficulty creating a Query that brings the two tables together because there are common fields between them (like "name"). Without this query I can�t create a report that pulls in related family members can I? I�ve now completed through Access 201. What I�m faced with is generating a report very similar to the contacts report done in 104 & 201. I want it to list a primary member�s name and their information and then also list all the family members related to them via a relationship.

A: It's perfectly fine if you have duplicate names between two related tables. What you're going to end up with is PrimaryT.FirstName and FamilyT.FirstName in the same query, form, or report. This will work OK. A better method, however, might be to just use one table and relate it to itself. You can specify which family member is the Primary person (head of household) for example, and then make a query to show just the primaries. Then, relate the table to itself to create a query of primaries and the rest of the family members.


 

This technique could also be used for geneaology databases where each person is in a PersonT table, and each person has a MotherID and FatherID, and these are just links back to a PersonT record.

I know this might seem confusing, but it's real simple. See this Free Video Tutorial for step-by-step instructions:

 Click here to view the FREE video
   

 Click here for Sample Database File 
    ZIP file, 24k, Access 2003

If you've finished through Access 201, that's a great head start. I cover a LOT more with Access Queries in the upcoming classes... especially in Access 220 through 223 where I cover lots of advanced query techniques, action queries, and much more.

 


By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on Google Plus Richard Rost on LinkedIn Email Richard Rost

Click here to sign up for more FREE tips

 

You may want to read these articles from the 599CD News:

 

Learn
 
Accessindex
Excelindex
Wordindex
Windowsindex
PowerPointindex
Photoshopindex
Visual Basicindex
ASPindex
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Gift CDs
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP