Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
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 LinkedIn Email Richard Rost
Click here to sign up for more FREE tips

 

 

 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 8:24:52 AM. PLT: 0s