Results 1 to 4 of 4
  1. #1
    fret hack is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    13

    Associate multiple records from the same table

    Hello All,



    Im creating a database for a group in a state regulatory agency that issues permits. We often issue multiple permits for different parts of the same facility, and I need to find a way to properly associate these permits with each other. If a note is entered about one permit, I would like to propagate that note to the other associated permit records as well.

    Currently I have a main table (tPermitData) in a one-to-many relationship with a few subtables. Two of the tables are:

    • tPermitData_Assoc - Contains data describing which permits are associated together. Has a field containing the KeyID (non-unique) for the parent record and a field that contains the KeyID for an associated permit. If five permits are associated there are a total of 20 entries, 4 for each permit.
    • tPermitData_Notes - Contains a chronology of notes written for each permit by KeyID.


    My inclination is to do this with an update query tied to a command button, but Id like to know if there might be an easier, more intuitive way to enter the same note for all permits at once.

    Thanks in advance.

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    A query would be the way to go if you want to propagate to more than one table, but that sounds like a duplication of data, which would be unusual and not recommended. I can't tell if there can be many "notes" for one permit, or just one. If one and it's the first, it's not an update. If one and it's a revision, it's an update. If more than one and you update, you will over-write the first. If you can have many notes for one permit, you may need a junction table between permits and notes. It would repeat the permit ID for each note, like

    ID | NOTE
    6 | 4
    6 | 14
    6 | 40
    If I have that backwards and there's to be one NOTE and several permits, then reverse the example. If several of NOTE to each one of several permits, then more like

    ID | NOTE
    6 | 1
    7 | 1
    8 | 1
    1 | 2
    2 | 2
    3 | 2
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    fret hack is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    13
    Thank you for the quick reply. Its many notes to many permits.

    I had considered (and tried) a junction table but didnt know how to structure it. Ill use your suggestion and try again!

  4. #4
    Join Date
    Apr 2017
    Posts
    1,792
    From your post it looks like you need a table of facilities, to which permits are linked. Something like:

    tblFacilities:FacilityID, Facility
    tblPermits: PermitID, FacilityID, ...
    tblNotes: NoteID, PermitID, NoteDate, NoteText, ...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 03-15-2018, 09:50 PM
  2. Replies: 9
    Last Post: 05-08-2015, 02:36 PM
  3. Replies: 5
    Last Post: 12-01-2014, 11:31 AM
  4. Replies: 4
    Last Post: 12-18-2013, 04:08 PM
  5. How to associate persons
    By josephbupe in forum Access
    Replies: 1
    Last Post: 02-20-2010, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums