[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Table relationship and subform help for a beginner

Posted on 2014-04-22
2
Medium Priority
?
376 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 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