Access 2010
Access 2003
Seminars
Tips & Tricks
Access Forum
Course Index Insider Circle
 
Tutorials   News   Tips   Forums   Help   Logon   Order  
 
     
 
Tips & Tricks

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

   

  Access   Excel   Word   Windows   FrontPage   Hardware   Misc

 

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.

 

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

 

 
Learn
 
Microsoft Access
Microsoft Excel
Microsoft Word
Microsoft Windows
Microsoft PowerPoint
Adobe Photoshop
Visual Basic
Active Server Pages
Online Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
WalkThru Tutorials
Free Upgrades
Insider Circle
Info
 
Latest News
New Releases
User Forums
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Help
 
Live Chat
Customer Support
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Live Chat
General Contact Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Try Us
 
Free Lessons
Online Theater
Mailing List
Course Indexes:   Microsoft Access   Microsoft Excel   Microsoft Word   Microsoft PowerPoint   Visual Basic (VB)   Photoshop   Active Server Pages (ASP)  
Keyword Search Cloud:   What's This?   courses   microsoft access tutorials   vlookup   access   cartesian   excel   dlookup   vba   attendance   access 2007   sql   windows 7   combo box   pivot table   visual basic   test   iif   word   calendar   query   conditional formatting   pivot tables   photoshop   hlookup   access 101   excel 202   excel 2007   student attendance   update query   my account   word 2007   append query   quickbooks   queries   dsum   reports   powerpoint   if   microsoft access   dmax   mail merge   relationships   ms access   access 2010   vb   dcount   subforms   excel 2003   handbooks   html   599cd   combobox   if function   security   microsoft word   after update  
Copyright 2012 by 599CD.com, All Rights Reserved