?
Solved

Table relationship and subform help for a beginner

Posted on 2014-04-22
2
Medium Priority
?
378 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 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

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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: …
Suggested Courses

807 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