Results 1 to 4 of 4

Parent and Child Table Relations

  1. #1
    Saabra is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    4

    Parent and Child Table Relations

    Hi,
    Currently I have a parent table called "TBL_Admission_Data" with a unique ID being generated by MS Access. One of the fields in the parent table is called "Insurance Authorization #" and will be a 15 (or more) digit number. I've built a child table called "TBL_CONCURRENT_REVIEWS_Extensions". The two tables aren't connected yet but when they are, I would like the "Insurance Authorization #" entered in the parent table to become the unique ID for all the records in the child table. So I want whatever records are created in the parent table to automatically copy the Insurance Authorization # to the child table. Is this possible or will the child table need a separate unique ID#? Thank you for your help.
    Regards,
    Saabra

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    6,662
    There's some issues with the way you describe things. A value repeated in a field cannot be considered unique, for example. Nor is there any such thing as a parent or child table.
    If this is a one to many thing, the one side ought to have a unique id (such as an auto number). This auto number is considered to be the PK (primary key) in that table. That PK is stored in the related (many side) table as a foreign key (this table should also have its own PK). You join the PK of the one side to the FK of the many side. You should not be using PK fields to hold meaningful data, which is what your authorization number.
    Note that it is generally considered to be poor practice to use special characters (e.g. #) or spaces (save for underscore) in any object names.
    Naming info:

    What not to use in names - http://allenbrowne.com/AppIssueBadWord.html
    About Auto Numbers
    - http://www.utteraccess.com/wiki/Autonumbers
    - http://access.mvps.org/access/general/gen0025.htm
    - "doesn't work" doesn't help. Implement changes in copies of your database.
    "Everyone has a photographic memory; some just don't have film." Steven Wright

  3. #3
    Saabra is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    4
    Thank you Micron. I did not use any of the characters you mentioned. I understand naming conventions in Access. I was using those symbols to describe my challenge.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    6,662
    Sorry, I was guided by this
    One of the fields in the parent table is called "Insurance Authorization #"
    Upon reviewing your post again, I see that you expressed a need to have one table populate another
    I want whatever records are created in the parent table to automatically copy the Insurance Authorization # to the child table.
    Tables don't do this, forms do. What you describe is a typical one to many relationship where the 'one' data is on a main form and the 'many' data is on a subform. Often this is explained as a purchase order > purchase order details scenario. Hope that helps.

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

Similar Threads

  1. Replies: 2
    Last Post: 09-25-2018, 05:33 PM
  2. Parent-child relations
    By Dida in forum Access
    Replies: 8
    Last Post: 08-19-2015, 01:24 PM
  3. Replies: 7
    Last Post: 01-21-2014, 11:32 AM
  4. Replies: 3
    Last Post: 07-03-2013, 01:20 PM
  5. Replies: 10
    Last Post: 01-17-2011, 10:47 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
  •  
Tech Forums: Microsoft Office Forums