Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 554
  • Last Modified:

Show Relationship between records in same database

I want to show a relationship in Microsoft Access made database.  I am making a Member Profile Database.
What I want is this:  When I enter profiles: for instance Me and my daughter.  One field is labled Child's Name and I will put my daughters name in there. Done, then I will enter my Daughters profile and another field will be labled "Parent", there is where I put my name.  At the end, I want to be able to open my profile and be able to click in the Child's Name field and it will bring up my daughters profile and then I can clik in the "Parents" field and it will come back to me.  Can this be done in Microsoft Access?  I am just learning about access and building databases.
  • 2
1 Solution
Yes of course. You should set up all profiles in the same table but not store any relationship details in here.

The thing I would do is to the have a 3 column table called linked profiles or something. The columns would be ID 1 > ID 2 > Type.

So in your example if your profile is 1 and your daughters is 30:

ID 1 > ID 2 > Type
1        30      Parent
30       1       Child

As the relationship is 2 way you would need 2 entries to complete this properly.
This table could per represented as a sub form on your profile form and a you could write an event that take you to another profile when you click on the ID 2 box of the sub form.

Hope this helpos
This will accomodate those with more than one relationship (more than 1 child/parent) and many kinds of relationships could be siblings/aunt/grandparent etc

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now