Solved

Table relationship and subform help for a beginner

Posted on 2014-04-22
2
367 Views
Last Modified: 2014-04-22
I have a Projects table that has multiple notes with each project. I have a Company table with multiple notes with each company record and a Contacts table with multiple notes with each Contact record.

I want to create a Notes Table with NotesID, Date of Note, and Note as the fields but am having trouble putting the relationships together properly.

My end goal is to have the Notes show up as subforms on each of the Projects, Company, and Contacts Forms and only the notes that are specific to each of those records even though they are in different tables.

I have a NotesID field in each of the other tables and link it to the Notes table by NotesID. I've tried this several different ways and don't get errors but get different results than what I expect or don't get any results even though I have create notes already. So I would like to work through this from the beginning if possible. Thanks for the help.
0
Comment
Question by:circa62
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40015393
I think you perhaps have it backwards.

Your Notes table should store the value of the "parent" table, not the other way around. Since you have multiple "types" of Parents, you'll need to store that as well, or create separate tables for each "parent note".

So your notes table should look something like this:

NoteID
ParentID
ParentType
NoteText

If I then want to store a new Note for a Customer who has an ID value of 1234, the record would end up looking like this:

<NoteID> , 1234, 'Customer', 'This is my note text'

You could then create a Subform based on that table, and use the subform on your various parent forms. Set the Master/Child link fields to <YourParentIDFieldName>/ParentID. You'll also want to include a hidden Textbox (named, perhaps, "txNoteType") on each form, and use that as a second pair of link fields. Set that HIdden textbox to "Customer" for the Customers form, "Projects" for the Projects form, etc. Then add a second set of Link fields, with the Master/Child as txNoteType/ParentType.
0
 

Author Closing Comment

by:circa62
ID: 40015477
Thanks for the info, I think I'm on the right track now.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question